mejorar la gui de negromate para que detecte subtítulos con karaoke
This commit is contained in:
parent
f84965d112
commit
7ea885da08
|
@ -33,6 +33,7 @@ class Song(BoxLayout):
|
|||
self.video_type = None
|
||||
self.vtt = None
|
||||
self.srt = None
|
||||
self.karaoke = None
|
||||
self.ass = None
|
||||
self.cover = None
|
||||
self.thumbnail = None
|
||||
|
@ -60,6 +61,8 @@ class Song(BoxLayout):
|
|||
self.vtt = str(entry)
|
||||
elif entry.name == "{}.srt".format(self.path.name):
|
||||
self.srt = str(entry)
|
||||
elif entry.name.endswith('karaoke.ass'):
|
||||
self.karaoke = str(entry)
|
||||
elif entry.name.endswith('ass'):
|
||||
self.ass = str(entry)
|
||||
elif entry.name == 'thumb.jpg':
|
||||
|
@ -75,7 +78,7 @@ class Song(BoxLayout):
|
|||
|
||||
@property
|
||||
def subtitle(self):
|
||||
return self.ass or self.srt or self.vtt
|
||||
return self.karaoke or self.ass or self.srt or self.vtt
|
||||
|
||||
|
||||
class KaraokeGUI(BoxLayout):
|
||||
|
@ -149,6 +152,7 @@ class KaraokeGUI(BoxLayout):
|
|||
subprocess.call([
|
||||
'vlc',
|
||||
'--fullscreen',
|
||||
'--no-sub-autodetect-file',
|
||||
'--sub-file',
|
||||
self.active_song.subtitle,
|
||||
self.active_song.video,
|
||||
|
|
Reference in New Issue