소스 검색

[postprocessor/embedthumbnail] Skip embedding when there aren't any thumbnails

Andrew Udvare 7 년 전
부모
커밋
b5cbe3d652
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      youtube_dl/postprocessor/embedthumbnail.py

+ 2 - 1
youtube_dl/postprocessor/embedthumbnail.py

@@ -31,7 +31,8 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
         temp_filename = prepend_extension(filename, 'temp')
         temp_filename = prepend_extension(filename, 'temp')
 
 
         if not info.get('thumbnails'):
         if not info.get('thumbnails'):
-            raise EmbedThumbnailPPError('Thumbnail was not found. Nothing to do.')
+            self._downloader.to_screen('[embedthumbnail] There aren\'t any thumbnails to embed')
+            return [], info
 
 
         thumbnail_filename = info['thumbnails'][-1]['filename']
         thumbnail_filename = info['thumbnails'][-1]['filename']