From c778a890cf6bc81ddfcd1202cd21f8dbe51fa617 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Wed, 15 Mar 2023 05:50:02 +0000 Subject: [PATCH] Fix calls for Audio & Subtitle's OnMultiplex event --- devine/core/tracks/tracks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devine/core/tracks/tracks.py b/devine/core/tracks/tracks.py index 9e4f081..5134f35 100644 --- a/devine/core/tracks/tracks.py +++ b/devine/core/tracks/tracks.py @@ -328,8 +328,8 @@ class Tracks: 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( @@ -345,8 +345,8 @@ class Tracks: 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 ''}",