Standardize CAS view names for django_cas_ng.
[audio.git] / src / youtube / tasks.py
1 from archive.tasks import AudioFormatTask
2 from .models import YouTube
3
4
5 class YouTubeTask(AudioFormatTask):
6     ext = 'mkv'
7     prefix = 'youtube'
8
9     def encode(self, in_path, out_path):
10         YouTube.objects.first().prepare_file(in_path, out_path)
11
12     def set_tags(self, audiobook, filename):
13         pass
14
15     def put(self, user, audiobook, filename):
16         YouTube.objects.first().publish(audiobook, filename)