From 91d5c60d0a400cd71101bdd67a1947e3ba8f4cf1 Mon Sep 17 00:00:00 2001 From: shagi Date: Thu, 28 Jul 2022 17:49:51 +0200 Subject: [PATCH] Add songs without ass file as pending --- negromate/songs/loader.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/negromate/songs/loader.py b/negromate/songs/loader.py index bb80daa..9e05be6 100644 --- a/negromate/songs/loader.py +++ b/negromate/songs/loader.py @@ -115,6 +115,11 @@ class Song: has_video = self.video return has_video and has_subtitles + @property + def pending(self): + finished = self.ass and self.video + return not finished + def load_songs(root_folder, generate=True, regenerate=False, karaoke_template_file=None): songs = [] @@ -133,7 +138,7 @@ def load_songs(root_folder, generate=True, regenerate=False, karaoke_template_fi continue if song.publish: songs.append(song) - else: + if song.pending: pending_songs.append(song) songs.sort(key=lambda a: a.name)