]> jfr.im git - yt-dlp.git/commitdiff
Write thumbnail of playlist
authorpukkandan <redacted>
Mon, 17 May 2021 11:45:33 +0000 (17:15 +0530)
committerpukkandan <redacted>
Mon, 17 May 2021 12:54:17 +0000 (18:24 +0530)
Related: https://github.com/ytdl-org/youtube-dl/pull/28872, https://github.com/ytdl-org/youtube-dl/pull/28860
This is slightly different from the above PRs in that this downloads the playlist's thumbnail instead of the uploader's profile picture. But for youtube channel URLs these are the same

yt_dlp/YoutubeDL.py

index 72895eff5cc439c8950af8970072b9c7c4cc8325..c7d31a7e956aa63adce1d0f987a8c95aa29cfd80 100644 (file)
@@ -1379,6 +1379,9 @@ def make_playlistitems_entries(list_ie_entries):
                     except (OSError, IOError):
                         self.report_error('Cannot write playlist metadata to JSON file ' + infofn)
 
+            # TODO: This should be passed to ThumbnailsConvertor if necessary
+            self._write_thumbnails(ie_copy, self.prepare_filename(ie_copy, 'pl_thumbnail'))
+
             if self.params.get('writedescription', False):
                 descfn = self.prepare_filename(ie_copy, 'pl_description')
                 if not self._ensure_dir_exists(encodeFilename(descfn)):