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.video_type = None
|
||||||
self.vtt = None
|
self.vtt = None
|
||||||
self.srt = None
|
self.srt = None
|
||||||
|
self.karaoke = None
|
||||||
self.ass = None
|
self.ass = None
|
||||||
self.cover = None
|
self.cover = None
|
||||||
self.thumbnail = None
|
self.thumbnail = None
|
||||||
|
@ -60,6 +61,8 @@ class Song(BoxLayout):
|
||||||
self.vtt = str(entry)
|
self.vtt = str(entry)
|
||||||
elif entry.name == "{}.srt".format(self.path.name):
|
elif entry.name == "{}.srt".format(self.path.name):
|
||||||
self.srt = str(entry)
|
self.srt = str(entry)
|
||||||
|
elif entry.name.endswith('karaoke.ass'):
|
||||||
|
self.karaoke = str(entry)
|
||||||
elif entry.name.endswith('ass'):
|
elif entry.name.endswith('ass'):
|
||||||
self.ass = str(entry)
|
self.ass = str(entry)
|
||||||
elif entry.name == 'thumb.jpg':
|
elif entry.name == 'thumb.jpg':
|
||||||
|
@ -75,7 +78,7 @@ class Song(BoxLayout):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def subtitle(self):
|
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):
|
class KaraokeGUI(BoxLayout):
|
||||||
|
@ -149,6 +152,7 @@ class KaraokeGUI(BoxLayout):
|
||||||
subprocess.call([
|
subprocess.call([
|
||||||
'vlc',
|
'vlc',
|
||||||
'--fullscreen',
|
'--fullscreen',
|
||||||
|
'--no-sub-autodetect-file',
|
||||||
'--sub-file',
|
'--sub-file',
|
||||||
self.active_song.subtitle,
|
self.active_song.subtitle,
|
||||||
self.active_song.video,
|
self.active_song.video,
|
||||||
|
|
Reference in New Issue