Skip to content

Commit 24231c2

Browse files
authored
updated atomicparsley patch
1 parent 65644fe commit 24231c2

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

patches/embedthumbnail.py.patch

+9-19
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
diff --git a/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py b/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py
2-
index 56be914b8..31c663771 100644
2+
index 3990908b6..30c313199 100644
33
--- a/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py
44
+++ b/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py
5-
@@ -56,10 +56,16 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
6-
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
7-
5+
@@ -90,7 +90,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
6+
87
elif info['ext'] in ['m4a', 'mp4']:
9-
- if not check_executable('AtomicParsley', ['-v']):
10-
+ atomicparsley = None
11-
+ atomicparsleys = ['libatomicparsley.bin.so', 'AtomicParsley']
12-
+ for e in atomicparsleys:
13-
+ if check_executable(e, ['-v']):
14-
+ atomicparsley = e
15-
+ break
16-
+ if not atomicparsley:
17-
raise EmbedThumbnailPPError('AtomicParsley was not found. Please install.')
18-
19-
- cmd = [encodeFilename('AtomicParsley', True),
20-
+ cmd = [encodeFilename(atomicparsley, True),
21-
encodeFilename(filename, True),
22-
encodeArgument('--artwork'),
23-
encodeFilename(thumbnail_filename, True),
8+
atomicparsley = next((x
9+
- for x in ['AtomicParsley', 'atomicparsley']
10+
+ for x in ['libatomicparsley.bin.so', 'AtomicParsley', 'atomicparsley']
11+
if check_executable(x, ['-v'])), None)
12+
13+
if atomicparsley is None:

0 commit comments

Comments
 (0)