X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/c00e6aa94827f4972dc33fa79a53b5d9a15a726e..5f3db867cdab89e934f4946c58568039b780defe:/src/youtube/management/commands/youtube.py?ds=sidebyside diff --git a/src/youtube/management/commands/youtube.py b/src/youtube/management/commands/youtube.py index 4277818..c480830 100644 --- a/src/youtube/management/commands/youtube.py +++ b/src/youtube/management/commands/youtube.py @@ -12,12 +12,12 @@ class Command(BaseCommand): def handle(self, *args, **options): for audiobook in ( - Audiobook.objects.filter(status=status.QUEUED) + Audiobook.objects.filter(youtube_status=status.QUEUED) .exclude(youtube_queued=None) .order_by("youtube_queued")[: options["limit"]] ): - audiobook.youtube_task = tasks.YouTubeTask.delay( + tasks.YouTubeTask.delay( None, audiobook.id, True ).task_id audiobook.youtube_status = status.WAITING - audiobook.save(update_fields=["youtube_task", "youtube_status"]) + audiobook.save(update_fields=["youtube_status"])