From 0bfc53d05c7ecd7762313f0cd8578c46cd916519 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 21 Jan 2022 12:51:06 +0530 Subject: [PATCH] List playlist thumbnails in `--list-thumbnails` --- README.md | 2 +- yt_dlp/YoutubeDL.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 358f563c1..88a04aa4c 100644 --- a/README.md +++ b/README.md @@ -1808,7 +1808,7 @@ While these options are almost the same as their new counterparts, there are som -j, --dump-json --print "%()j" -F, --list-formats --print formats_table - --list-thumbnails --print thumbnails_table + --list-thumbnails --print thumbnails_table --print playlist:thumbnails_table --list-subs --print automatic_captions_table --print subtitles_table #### Redundant options diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 27fcc2a81..11708774e 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1709,7 +1709,10 @@ class YoutubeDL(object): ie_result['requested_entries'] = playlistitems _infojson_written = False - if not self.params.get('simulate') and self.params.get('allow_playlist_files', True): + write_playlist_files = self.params.get('allow_playlist_files', True) + if write_playlist_files and self.params.get('list_thumbnails'): + self.list_thumbnails(ie_result) + if write_playlist_files and not self.params.get('simulate'): ie_copy = self._playlist_infodict(ie_result, n_entries=n_entries) _infojson_written = self._write_info_json( 'playlist', ie_result, self.prepare_filename(ie_copy, 'pl_infojson'))