1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-04 23:52:56 +08:00

Escape single quotes in filename

There are probably other special characters that will need to be
replaced.
This commit is contained in:
AGSPhoenix 2014-04-19 05:23:07 -04:00
parent ce9f19fd2b
commit 3defc240da

View File

@ -506,6 +506,7 @@ class FFmpegConcatPP(FFmpegPostProcessor):
#No method using solely the command line is listed. And I'm like "really?".
with open(filename + '.list.txt', 'wb') as f:
for file in info['__files_to_append']:
file = file.replace("'", "\\'")
f.write("file '" + file + "'\n")
self.run_ffmpeg_multiple_files([filename + '.list.txt'], filename, args, preopts=concatargs)
os.unlink(filename + '.list.txt')