1 from archive.tasks import AudioFormatTask
2 from .models import YouTube
5 class YouTubeTask(AudioFormatTask):
9 def encode(self, in_path, out_path):
10 YouTube.objects.first().prepare_file(in_path, out_path)
12 def set_tags(self, audiobook, filename):
16 def save(cls, audiobook, file_name):
17 """We do not save the video files."""
20 def put(self, user, audiobook, filename):
21 YouTube.objects.first().publish(audiobook, filename)