- tags = {}
- #audiobook.set_youtube_tags(tags)
- audiobook.youtube_status = status.WAITING
- audiobook.save(update_fields=['youtube_status'])
- audiobook.youtube_task = tasks.YouTubeTask.delay(request.user.id, aid, publish).task_id
- audiobook.save(update_fields=['youtube_task'])
+ if audiobook.is_youtube_publishable:
+ audiobook.youtube_status = status.QUEUED
+ audiobook.youtube_queued = now()
+ audiobook.save(update_fields=['youtube_status', 'youtube_queued'])