X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/1c72d045af4d7c5607a872a678eadec17498bd6d..6f51733275b7a709d519adf2505dd0dc1b886466:/src/youtube/tasks.py?ds=sidebyside diff --git a/src/youtube/tasks.py b/src/youtube/tasks.py index cad3d11..7cf5eac 100644 --- a/src/youtube/tasks.py +++ b/src/youtube/tasks.py @@ -10,7 +10,7 @@ class YouTubeTask(AudioFormatTask): def encode(self, in_paths, out_path): self.audiobook.project.youtube.prepare_file(in_paths, out_path) - def set_tags(self, audiobook, filename): + def set_tags(self, tags, filename): pass @classmethod @@ -23,12 +23,16 @@ class YouTubeTask(AudioFormatTask): def get_source_file_paths(self, audiobook): if not audiobook.youtube_volume: - return [audiobook.source_file.path] - return [ - a.source_file.path - for a in type(audiobook) - .objects.filter( - slug=audiobook.slug, youtube_volume=audiobook.youtube_volume - ) - .order_by("index") - ] + paths = [audiobook.source_file.path] + else: + paths = [ + a.source_file.path + for a in type(audiobook) + .objects.filter( + slug=audiobook.slug, youtube_volume=audiobook.youtube_volume + ) + .order_by("index") + ] + if audiobook.project.info_flac: + paths.append(audiobook.project.info_flac.path) + return paths