From 8827ffd5cdea1cb88c0862c138c93150e5fcb161 Mon Sep 17 00:00:00 2001 From: imSp4rky Date: Wed, 26 Aug 2026 11:31:38 -0600 Subject: [PATCH] fix(mux): give each parallel mux its own chapters temp file --- unshackle/core/tracks/tracks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unshackle/core/tracks/tracks.py b/unshackle/core/tracks/tracks.py index c6c16a28..3468f0ae 100644 --- a/unshackle/core/tracks/tracks.py +++ b/unshackle/core/tracks/tracks.py @@ -1,7 +1,9 @@ from __future__ import annotations import logging +import os import subprocess +import threading import time from functools import partial from pathlib import Path @@ -692,7 +694,7 @@ class Tracks: if self.chapters: chapters_path = config.directories.temp / config.filenames.chapters.format( - title=sanitize_filename(title), random=self.chapters.id + title=sanitize_filename(title), random=f"{self.chapters.id}_{os.getpid()}_{threading.get_ident()}" ) self.chapters.dump(chapters_path, fallback_name=config.chapter_fallback_name) cl.extend(["--chapter-charset", "UTF-8", "--chapters", str(chapters_path)])