Add songs without ass file as pending

This commit is contained in:
Ales (Shagi) Zabala Alava 2022-07-28 17:49:51 +02:00
parent 6146dd9311
commit 91d5c60d0a
1 changed files with 6 additions and 1 deletions

View File

@ -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)