2 from archive.tasks import AudioFormatTask
3 from .models import YouTube
6 class YouTubeTask(AudioFormatTask):
10 def encode(self, in_path, out_path):
11 YouTube.objects.first().prepare_file(in_path, out_path)
13 def set_tags(self, audiobook, filename):
17 def save(cls, audiobook, file_name):
18 """We do not save the video files."""
21 def put(self, user, audiobook, filename):
22 YouTube.objects.first().publish(audiobook, filename)