forked from DRMTalks/devine
Fix calls for Audio & Subtitle's OnMultiplex event
This commit is contained in:
parent
0ac1955db6
commit
c778a890cf
|
@ -328,8 +328,8 @@ class Tracks:
|
||||||
for i, at in enumerate(self.audio):
|
for i, at in enumerate(self.audio):
|
||||||
if not at.path or not at.path.exists():
|
if not at.path or not at.path.exists():
|
||||||
raise ValueError("Audio Track must be downloaded before muxing...")
|
raise ValueError("Audio Track must be downloaded before muxing...")
|
||||||
if callable(vt.OnMultiplex):
|
if callable(at.OnMultiplex):
|
||||||
vt.OnMultiplex(vt)
|
at.OnMultiplex(at)
|
||||||
cl.extend([
|
cl.extend([
|
||||||
"--track-name", f"0:{at.get_track_name() or ''}",
|
"--track-name", f"0:{at.get_track_name() or ''}",
|
||||||
"--language", "0:{}".format(LANGUAGE_MUX_MAP.get(
|
"--language", "0:{}".format(LANGUAGE_MUX_MAP.get(
|
||||||
|
@ -345,8 +345,8 @@ class Tracks:
|
||||||
for st in self.subtitles:
|
for st in self.subtitles:
|
||||||
if not st.path or not st.path.exists():
|
if not st.path or not st.path.exists():
|
||||||
raise ValueError("Text Track must be downloaded before muxing...")
|
raise ValueError("Text Track must be downloaded before muxing...")
|
||||||
if callable(vt.OnMultiplex):
|
if callable(st.OnMultiplex):
|
||||||
vt.OnMultiplex(vt)
|
st.OnMultiplex(st)
|
||||||
default = bool(self.audio and is_close_match(st.language, [self.audio[0].language]) and st.forced)
|
default = bool(self.audio and is_close_match(st.language, [self.audio[0].language]) and st.forced)
|
||||||
cl.extend([
|
cl.extend([
|
||||||
"--track-name", f"0:{st.get_track_name() or ''}",
|
"--track-name", f"0:{st.get_track_name() or ''}",
|
||||||
|
|
Loading…
Reference in New Issue