|
|
@ -583,11 +583,14 @@ try:
|
|
|
|
if (seconds is None or new_seconds < seconds) and new_seconds > 0:
|
|
|
|
if (seconds is None or new_seconds < seconds) and new_seconds > 0:
|
|
|
|
seconds = new_seconds
|
|
|
|
seconds = new_seconds
|
|
|
|
og_time_str = time_to_run
|
|
|
|
og_time_str = time_to_run
|
|
|
|
hours = int(seconds // 3600)
|
|
|
|
if seconds is not None:
|
|
|
|
minutes = int((seconds % 3600) // 60)
|
|
|
|
hours = int(seconds // 3600)
|
|
|
|
time_str = f"{hours} Hour{'s' if hours > 1 else ''} and " if hours > 0 else ""
|
|
|
|
minutes = int((seconds % 3600) // 60)
|
|
|
|
time_str += f"{minutes} Minute{'s' if minutes > 1 else ''}"
|
|
|
|
time_str = f"{hours} Hour{'s' if hours > 1 else ''} and " if hours > 0 else ""
|
|
|
|
util.print_return(f"Current Time: {current} | {time_str} until the next run at {og_time_str} | Runs: {', '.join(times_to_run)}")
|
|
|
|
time_str += f"{minutes} Minute{'s' if minutes > 1 else ''}"
|
|
|
|
|
|
|
|
util.print_return(f"Current Time: {current} | {time_str} until the next run at {og_time_str} | Runs: {', '.join(times_to_run)}")
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
logger.error(f"Time Error: {valid_times}")
|
|
|
|
time.sleep(60)
|
|
|
|
time.sleep(60)
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
util.separator("Exiting Plex Meta Manager")
|
|
|
|
util.separator("Exiting Plex Meta Manager")
|
|
|
|