Skip to content

Commit

Permalink
Merge pull request #6 from xibr/patch-1
Browse files Browse the repository at this point in the history
updated atomicparsley patch
  • Loading branch information
yausername authored Feb 23, 2021
2 parents 65644fe + 24231c2 commit 79430f6
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions patches/embedthumbnail.py.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
diff --git a/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py b/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py
index 56be914b8..31c663771 100644
index 3990908b6..30c313199 100644
--- a/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py
+++ b/youtube-dl/youtube_dl/postprocessor/embedthumbnail.py
@@ -56,10 +56,16 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
os.rename(encodeFilename(temp_filename), encodeFilename(filename))

@@ -90,7 +90,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):

elif info['ext'] in ['m4a', 'mp4']:
- if not check_executable('AtomicParsley', ['-v']):
+ atomicparsley = None
+ atomicparsleys = ['libatomicparsley.bin.so', 'AtomicParsley']
+ for e in atomicparsleys:
+ if check_executable(e, ['-v']):
+ atomicparsley = e
+ break
+ if not atomicparsley:
raise EmbedThumbnailPPError('AtomicParsley was not found. Please install.')

- cmd = [encodeFilename('AtomicParsley', True),
+ cmd = [encodeFilename(atomicparsley, True),
encodeFilename(filename, True),
encodeArgument('--artwork'),
encodeFilename(thumbnail_filename, True),
atomicparsley = next((x
- for x in ['AtomicParsley', 'atomicparsley']
+ for x in ['libatomicparsley.bin.so', 'AtomicParsley', 'atomicparsley']
if check_executable(x, ['-v'])), None)

if atomicparsley is None:

0 comments on commit 79430f6

Please sign in to comment.