New property for songs: has_subtitles
This commit is contained in:
parent
b4fdf6dafb
commit
132ed675e7
|
@ -109,11 +109,13 @@ class Song:
|
||||||
self.karaoke_ass = karaoke_ass
|
self.karaoke_ass = karaoke_ass
|
||||||
generate_karaoke_ass(str(karaoke_template_file), str(self.ass), str(karaoke_ass))
|
generate_karaoke_ass(str(karaoke_template_file), str(self.ass), str(karaoke_ass))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_subtitles(self):
|
||||||
|
return self.ass or self.srt or self.vtt
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def publish(self):
|
def publish(self):
|
||||||
has_subtitles = self.ass or self.srt or self.vtt
|
return self.video and self.has_subtitles
|
||||||
has_video = self.video
|
|
||||||
return has_video and has_subtitles
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pending(self):
|
def pending(self):
|
||||||
|
|
Loading…
Reference in New Issue