]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/embedthumbnail.py
[embedthumbnail] Correctly escape filename
[yt-dlp.git] / yt_dlp / postprocessor / embedthumbnail.py
index f3eb7d96d50610ee4905497d7af370a30ddc4a94..278a45eb64b42294681a58ed8c688b1d6c0b0ae3 100644 (file)
@@ -70,7 +70,7 @@ def run(self, info):
             self.to_screen('There aren\'t any thumbnails to embed')
             return [], info
 
-        idx = next((-(i+1) for i, t in enumerate(info['thumbnails'][::-1]) if t.get('filepath')), None)
+        idx = next((-i for i, t in enumerate(info['thumbnails'][::-1], 1) if t.get('filepath')), None)
         if idx is None:
             self.to_screen('There are no thumbnails on disk')
             return [], info