also turn of auto stop if full time is less than 1

This commit is contained in:
iLLiCiTiT 2021-09-28 13:14:25 +02:00
parent e3e933a1d6
commit 8b1fa050fc

View file

@ -93,16 +93,16 @@ class TimersManager(OpenPypeModule, ITrayService):
self.enabled = timers_settings["enabled"]
auto_stop = timers_settings["auto_stop"]
# Turn of auto stop on MacOs because pynput requires root permissions
if platform.system().lower() == "darwin":
auto_stop = False
# When timer will stop if idle manager is running (minutes)
full_time = int(timers_settings["full_time"] * 60)
# How many minutes before the timer is stopped will popup the message
message_time = int(timers_settings["message_time"] * 60)
auto_stop = timers_settings["auto_stop"]
# Turn of auto stop on MacOs because pynput requires root permissions
if platform.system().lower() == "darwin" or full_time <= 0:
auto_stop = False
self.auto_stop = auto_stop
self.time_show_message = full_time - message_time
self.time_stop_timer = full_time