mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-26 19:05:13 +00:00
fix(mux): give each parallel mux its own chapters temp file
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import threading
|
||||||
import time
|
import time
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -692,7 +694,7 @@ class Tracks:
|
|||||||
|
|
||||||
if self.chapters:
|
if self.chapters:
|
||||||
chapters_path = config.directories.temp / config.filenames.chapters.format(
|
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)
|
self.chapters.dump(chapters_path, fallback_name=config.chapter_fallback_name)
|
||||||
cl.extend(["--chapter-charset", "UTF-8", "--chapters", str(chapters_path)])
|
cl.extend(["--chapter-charset", "UTF-8", "--chapters", str(chapters_path)])
|
||||||
|
|||||||
Reference in New Issue
Block a user