diff --git a/devine/commands/dl.py b/devine/commands/dl.py index 022561d..d585c76 100644 --- a/devine/commands/dl.py +++ b/devine/commands/dl.py @@ -341,7 +341,7 @@ class dl: non_sdh_sub = deepcopy(subtitle) non_sdh_sub.id += "_stripped" non_sdh_sub.sdh = False - non_sdh_sub.OnMultiplex = lambda x: x.strip_hearing_impaired() + non_sdh_sub.OnMultiplex = lambda: non_sdh_sub.strip_hearing_impaired() title.tracks.add(non_sdh_sub) with console.status("Sorting tracks by language and bitrate...", spinner="dots"): @@ -585,7 +585,7 @@ class dl: track.repackage() has_repacked = True if callable(track.OnRepacked): - track.OnRepacked(track) + track.OnRepacked() if has_repacked: # we don't want to fill up the log with "Repacked x track" self.log.info("Repacked one or more tracks with FFMPEG") @@ -899,7 +899,7 @@ class dl: drm.decrypt(save_path) track.drm = None if callable(track.OnDecrypted): - track.OnDecrypted(track) + track.OnDecrypted() progress(downloaded="Decrypted", completed=100) if isinstance(track, Subtitle): @@ -931,7 +931,7 @@ class dl: raise IOError("Download failed, the downloaded file is empty.") if callable(track.OnDownloaded): - track.OnDownloaded(track) + track.OnDownloaded() @staticmethod def get_profile(service: str) -> Optional[str]: diff --git a/devine/core/manifests/dash.py b/devine/core/manifests/dash.py index 6b4502f..129cd88 100644 --- a/devine/core/manifests/dash.py +++ b/devine/core/manifests/dash.py @@ -507,7 +507,7 @@ class DASH: drm.decrypt(save_path) track.drm = None if callable(track.OnDecrypted): - track.OnDecrypted(track) + track.OnDecrypted() progress(downloaded="Decrypted", completed=100) track.path = save_path diff --git a/devine/core/manifests/hls.py b/devine/core/manifests/hls.py index 6afe1ad..1639eb6 100644 --- a/devine/core/manifests/hls.py +++ b/devine/core/manifests/hls.py @@ -511,7 +511,7 @@ class HLS: newest_segment_key[0].decrypt(out_path) track.drm = None if callable(track.OnDecrypted): - track.OnDecrypted(track) + track.OnDecrypted() return download_size diff --git a/devine/core/tracks/tracks.py b/devine/core/tracks/tracks.py index 65c945c..d96804c 100644 --- a/devine/core/tracks/tracks.py +++ b/devine/core/tracks/tracks.py @@ -304,7 +304,7 @@ class Tracks: if not vt.path or not vt.path.exists(): raise ValueError("Video Track must be downloaded before muxing...") if callable(vt.OnMultiplex): - vt.OnMultiplex(vt) + vt.OnMultiplex() cl.extend([ "--language", "0:{}".format(LANGUAGE_MUX_MAP.get( str(vt.language), str(vt.language) @@ -319,7 +319,7 @@ class Tracks: if not at.path or not at.path.exists(): raise ValueError("Audio Track must be downloaded before muxing...") if callable(at.OnMultiplex): - at.OnMultiplex(at) + at.OnMultiplex() cl.extend([ "--track-name", f"0:{at.get_track_name() or ''}", "--language", "0:{}".format(LANGUAGE_MUX_MAP.get( @@ -336,7 +336,7 @@ class Tracks: if not st.path or not st.path.exists(): raise ValueError("Text Track must be downloaded before muxing...") if callable(st.OnMultiplex): - st.OnMultiplex(st) + st.OnMultiplex() 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 ''}",