[postprocessor/embedthumbnail] Recognize atomicparsley binary in lowercase (#28112)
authorMax <github@nbr23.com>
Tue, 16 Feb 2021 20:22:51 +0000 (15:22 -0500)
committerGitHub <noreply@github.com>
Tue, 16 Feb 2021 20:22:51 +0000 (03:22 +0700)
youtube_dl/postprocessor/embedthumbnail.py

index 5a33595886853e95c52ffbfa465193260d8f8893..3990908b69156c5a8c9cf79c7940b4e088eeeca3 100644 (file)
@@ -89,10 +89,14 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
             os.rename(encodeFilename(temp_filename), encodeFilename(filename))
 
         elif info['ext'] in ['m4a', 'mp4']:
-            if not check_executable('AtomicParsley', ['-v']):
+            atomicparsley = next((x
+                                  for x in ['AtomicParsley', 'atomicparsley']
+                                  if check_executable(x, ['-v'])), None)
+
+            if atomicparsley is None:
                 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),