From 459cb4b891e869f0e4d79ad5d17f0bcdd54cc20f Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 4 Feb 2025 11:21:24 -0500 Subject: [PATCH] Remove the `td` function It is no longer being used for a default argument value. --- tubesync/sync/tasks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index 3868cc84..273c5ba5 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -586,7 +586,6 @@ def rename_all_media_for_source(source_id): @background(schedule=0) def wait_for_media_premiere(media_id): - td = lambda p, now=timezone.now(): (p - now) hours = lambda td: 1+int((24*td.days)+(td.seconds/(60*60))) try: @@ -603,6 +602,6 @@ def wait_for_media_premiere(media_id): media.save() else: media.manual_skip = True - media.title = _(f'Premieres in {hours(td(media.published, now))} hours') + media.title = _(f'Premieres in {hours(media.published - now)} hours') media.save()