mirror of https://github.com/devine-dl/devine.git
fix(dl): Add single mux job if there's no video tracks
Fixes regression from v3.1.0 with --audio-only, --subs-only and --chapters-only.
This commit is contained in:
parent
eeccdc37cf
commit
4c395edc53
|
@ -622,8 +622,9 @@ class dl:
|
||||||
)
|
)
|
||||||
|
|
||||||
multiplex_tasks: list[tuple[TaskID, Tracks]] = []
|
multiplex_tasks: list[tuple[TaskID, Tracks]] = []
|
||||||
for video_track in title.tracks.videos:
|
for video_track in title.tracks.videos or [None]:
|
||||||
task_description = "Multiplexing"
|
task_description = "Multiplexing"
|
||||||
|
if video_track:
|
||||||
if len(quality) > 1:
|
if len(quality) > 1:
|
||||||
task_description += f" {video_track.height}p"
|
task_description += f" {video_track.height}p"
|
||||||
if len(range_) > 1:
|
if len(range_) > 1:
|
||||||
|
@ -632,6 +633,7 @@ class dl:
|
||||||
task_id = progress.add_task(f"{task_description}...", total=None, start=False)
|
task_id = progress.add_task(f"{task_description}...", total=None, start=False)
|
||||||
|
|
||||||
task_tracks = Tracks(title.tracks) + title.tracks.chapters
|
task_tracks = Tracks(title.tracks) + title.tracks.chapters
|
||||||
|
if video_track:
|
||||||
task_tracks.videos = [video_track]
|
task_tracks.videos = [video_track]
|
||||||
|
|
||||||
multiplex_tasks.append((task_id, task_tracks))
|
multiplex_tasks.append((task_id, task_tracks))
|
||||||
|
@ -653,7 +655,8 @@ class dl:
|
||||||
elif return_code >= 2:
|
elif return_code >= 2:
|
||||||
self.log.error(f"Failed to Mux video to Matroska file ({return_code})")
|
self.log.error(f"Failed to Mux video to Matroska file ({return_code})")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
task_tracks.videos[0].delete()
|
for video_track in task_tracks.videos:
|
||||||
|
video_track.delete()
|
||||||
for track in title.tracks:
|
for track in title.tracks:
|
||||||
track.delete()
|
track.delete()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue