mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 21:23:05 +00:00
Fix attachments in subpaths
This commit is contained in:
parent
7fb0c05ff6
commit
45d1f2bb6c
@ -1,6 +1,8 @@
|
|||||||
# flake8: noqa: F401
|
# flake8: noqa: F401
|
||||||
# isort: off
|
# isort: off
|
||||||
|
|
||||||
|
from .demo import DemoIE
|
||||||
|
|
||||||
from .youtube import ( # Youtube is moved to the top to improve performance
|
from .youtube import ( # Youtube is moved to the top to improve performance
|
||||||
YoutubeIE,
|
YoutubeIE,
|
||||||
YoutubeClipIE,
|
YoutubeClipIE,
|
||||||
|
@ -673,11 +673,12 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor):
|
|||||||
|
|
||||||
for json_lang, json_filename in json_subs.items():
|
for json_lang, json_filename in json_subs.items():
|
||||||
escaped_json_filename = self._ffmpeg_filename_argument(json_filename)
|
escaped_json_filename = self._ffmpeg_filename_argument(json_filename)
|
||||||
|
json_basename = os.path.basename(json_filename)
|
||||||
opts.extend([
|
opts.extend([
|
||||||
'-map', f'-0:m:filename:{json_lang}.json?',
|
'-map', f'-0:m:filename:{json_lang}.json?',
|
||||||
'-attach', escaped_json_filename,
|
'-attach', escaped_json_filename,
|
||||||
f'-metadata:s:m:filename:{escaped_json_filename}', 'mimetype=application/json',
|
f'-metadata:s:m:filename:{json_basename}', 'mimetype=application/json',
|
||||||
f'-metadata:s:m:filename:{escaped_json_filename}', f'filename={json_lang}.json',
|
f'-metadata:s:m:filename:{json_basename}', f'filename={json_lang}.json',
|
||||||
])
|
])
|
||||||
|
|
||||||
temp_filename = prepend_extension(filename, 'temp')
|
temp_filename = prepend_extension(filename, 'temp')
|
||||||
|
Loading…
Reference in New Issue
Block a user