mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 21:33:18 -07:00
Fix queue tables displaying intervals greater than 24 hours
This commit is contained in:
parent
ce4bfd56c2
commit
87a77f0522
1 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
<%
|
||||
import arrow
|
||||
import datetime
|
||||
from plexpy import helpers
|
||||
from plexpy.activity_handler import ACTIVITY_SCHED, schedule_callback
|
||||
|
||||
if queue == 'active sessions':
|
||||
|
@ -44,12 +45,12 @@
|
|||
% for job in scheduled_jobs:
|
||||
<%
|
||||
sched_job = ACTIVITY_SCHED.get_job(job)
|
||||
next_run_in = arrow.get(sched_job.next_run_time).timestamp - arrow.now().timestamp
|
||||
now = datetime.datetime.now(sched_job.next_run_time.tzinfo)
|
||||
%>
|
||||
<tr>
|
||||
<td><strong>${title_format.format(*sched_job.args)}</strong></td>
|
||||
<td>${arrow.get(next_run_in).format('HH:mm:ss')}</td>
|
||||
<td>${arrow.get(sched_job.next_run_time).format('YYYY-MM-DD HH:mm:ss')}</td>
|
||||
<td>${helpers.format_timedelta_Hms(sched_job.next_run_time - now)}</td>
|
||||
<td>${sched_job.next_run_time.strftime('%Y-%m-%d %H:%M:%S')}</td>
|
||||
</tr>
|
||||
% endfor
|
||||
% else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue