From f1d44c051dfa5f6219551dc4ffae04be7952fb31 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:39:33 -0700 Subject: [PATCH] Fix loading of scheduled tasks when tasks are disabled --- data/interfaces/default/scheduler_table.html | 7 ++----- plexpy/common.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/data/interfaces/default/scheduler_table.html b/data/interfaces/default/scheduler_table.html index 8d264aa9..c4087f17 100644 --- a/data/interfaces/default/scheduler_table.html +++ b/data/interfaces/default/scheduler_table.html @@ -13,8 +13,6 @@ DOCUMENTATION :: END import datetime import plexpy from plexpy import common, helpers - - scheduled_jobs = [j.id for j in plexpy.SCHED.get_jobs()] %>
${sched_job.id} | Active | ${helpers.format_timedelta_Hms(sched_job.trigger.interval)} | -${helpers.format_timedelta_Hms(sched_job.next_run_time - now)} | +${helpers.format_timedelta_Hms(sched_job.next_run_time - datetime.datetime.now(sched_job.next_run_time.tzinfo))} | ${sched_job.next_run_time.astimezone(plexpy.SYS_TIMEZONE).strftime('%Y-%m-%d %H:%M:%S')} |