Fix regression where only last mux would be moved to dl folder

This commit is contained in:
rlaphoenix 2023-03-27 18:51:32 +01:00
parent 8c14b73bc1
commit 527cd4cca1
1 changed files with 13 additions and 9 deletions

View File

@ -598,6 +598,8 @@ class dl:
# we don't want to fill up the log with "Repacked x track"
self.log.info("Repacked one or more tracks with FFMPEG")
muxed_paths = []
if isinstance(title, (Movie, Episode)):
progress = Progress(
TextColumn("[progress.description]{task.description}"),
@ -628,6 +630,7 @@ class dl:
progress=partial(progress.update, task_id=task),
delete=False
)
muxed_paths.append(muxed_path)
if return_code == 1:
self.log.warning("mkvmerge had at least one warning, will continue anyway...")
elif return_code >= 2:
@ -638,8 +641,9 @@ class dl:
track.delete()
else:
# dont mux
muxed_path = title.tracks.audio[0].path
muxed_paths.append(title.tracks.audio[0].path)
for muxed_path in muxed_paths:
media_info = MediaInfo.parse(muxed_path)
final_dir = config.directories.downloads
final_filename = title.get_filename(media_info, show_service=not no_source)