Skip to content

Commit

Permalink
Fix calls for Audio & Subtitle's OnMultiplex event
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaphoenix committed Mar 15, 2023
1 parent 0ac1955 commit c778a89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions devine/core/tracks/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ def mux(self, title: str, delete: bool = True, progress: Optional[partial] = Non
for i, at in enumerate(self.audio):
if not at.path or not at.path.exists():
raise ValueError("Audio Track must be downloaded before muxing...")
if callable(vt.OnMultiplex):
vt.OnMultiplex(vt)
if callable(at.OnMultiplex):
at.OnMultiplex(at)
cl.extend([
"--track-name", f"0:{at.get_track_name() or ''}",
"--language", "0:{}".format(LANGUAGE_MUX_MAP.get(
Expand All @@ -345,8 +345,8 @@ def mux(self, title: str, delete: bool = True, progress: Optional[partial] = Non
for st in self.subtitles:
if not st.path or not st.path.exists():
raise ValueError("Text Track must be downloaded before muxing...")
if callable(vt.OnMultiplex):
vt.OnMultiplex(vt)
if callable(st.OnMultiplex):
st.OnMultiplex(st)
default = bool(self.audio and is_close_match(st.language, [self.audio[0].language]) and st.forced)
cl.extend([
"--track-name", f"0:{st.get_track_name() or ''}",
Expand Down

0 comments on commit c778a89

Please sign in to comment.