diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-09 17:40:24 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-10 01:22:55 +0530 |
commit | ad3dc496bbf2e2a574a16244ddde0740778e5daf (patch) | |
tree | f4eeaf0711946c1181ce1769c33d8ff94c3847cd /yt_dlp/YoutubeDL.py | |
parent | 2831b4686c2436cd151260539e010ce3577911cc (diff) | |
download | hypervideo-pre-ad3dc496bbf2e2a574a16244ddde0740778e5daf.tar.lz hypervideo-pre-ad3dc496bbf2e2a574a16244ddde0740778e5daf.tar.xz hypervideo-pre-ad3dc496bbf2e2a574a16244ddde0740778e5daf.zip |
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
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 7 |
1 files changed, 4 insertions, 3 deletions
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 = {} |