From ad3dc496bbf2e2a574a16244ddde0740778e5daf Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 9 Aug 2021 17:40:24 +0530 Subject: Misc fixes - See desc * Remove unnecessary uses of _list_from_options_callback * Fix download tests - Bug from 6e84b21559f586ee4d6affb61688d5c6a0c21221 * Rename ExecAfterDownloadPP to ExecPP and refactor its tests * Ensure _write_ytdl_file closes file handle on error - Potential fix for #517 --- yt_dlp/YoutubeDL.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'yt_dlp/YoutubeDL.py') diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 7edae6fa2..5937e85bd 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2339,7 +2339,8 @@ class YoutubeDL(object): requested_langs = ['en'] else: requested_langs = [list(all_sub_langs)[0]] - self.write_debug('Downloading subtitles: %s' % ', '.join(requested_langs)) + if requested_langs: + self.write_debug('Downloading subtitles: %s' % ', '.join(requested_langs)) formats_query = self.params.get('subtitlesformat', 'best') formats_preference = formats_query.split('/') if formats_query else [] @@ -3256,13 +3257,13 @@ class YoutubeDL(object): from .postprocessor.embedthumbnail import has_mutagen from .cookies import SQLITE_AVAILABLE, KEYRING_AVAILABLE - lib_str = ', '.join(filter(None, ( + lib_str = ', '.join(sorted(filter(None, ( can_decrypt_frag and 'pycryptodome', has_websockets and 'websockets', has_mutagen and 'mutagen', SQLITE_AVAILABLE and 'sqlite', KEYRING_AVAILABLE and 'keyring', - ))) or 'none' + )))) or 'none' self._write_string('[debug] Optional libraries: %s\n' % lib_str) proxy_map = {} -- cgit v1.2.3