From dc558516cc200b1925252cc6f5363c2016d36a64 Mon Sep 17 00:00:00 2001 From: Andrew Udvare Date: Mon, 27 Mar 2017 01:57:59 -0400 Subject: [PATCH 1/2] [postprocessor/embedthumbnail] Do not raise exception if there is no thumbnail to embed --- youtube_dl/postprocessor/embedthumbnail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/youtube_dl/postprocessor/embedthumbnail.py index e606a58de..fcd8057fc 100644 --- a/youtube_dl/postprocessor/embedthumbnail.py +++ b/youtube_dl/postprocessor/embedthumbnail.py @@ -31,7 +31,8 @@ class EmbedThumbnailPP(FFmpegPostProcessor): temp_filename = prepend_extension(filename, 'temp') if not info.get('thumbnails'): - raise EmbedThumbnailPPError('Thumbnail was not found. Nothing to do.') + self._downloader.to_screen('[embedthumbnail] Thumbnail was not found. Nothing to do.') + return [], info thumbnail_filename = info['thumbnails'][-1]['filename'] From d1c37697a108e791532459cfc4cd0dea13b8f30c Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sun, 25 Feb 2018 19:31:13 +0700 Subject: [PATCH 2/2] Update embedthumbnail.py --- youtube_dl/postprocessor/embedthumbnail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/youtube_dl/postprocessor/embedthumbnail.py index fcd8057fc..56be914b8 100644 --- a/youtube_dl/postprocessor/embedthumbnail.py +++ b/youtube_dl/postprocessor/embedthumbnail.py @@ -31,7 +31,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): temp_filename = prepend_extension(filename, 'temp') if not info.get('thumbnails'): - self._downloader.to_screen('[embedthumbnail] 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']