diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-09-01 16:49:03 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-09-01 16:49:03 +0530 |
commit | d2c8aadf799a63aaa7da81ae03052b1ec2addd20 (patch) | |
tree | b6c1e217d7098bea54c4de65ba0615c6ef93936f /yt_dlp/YoutubeDL.py | |
parent | 1ac7f461845b3f9c0c3a2e6a1308bf82d3e8e55a (diff) | |
download | hypervideo-pre-d2c8aadf799a63aaa7da81ae03052b1ec2addd20.tar.lz hypervideo-pre-d2c8aadf799a63aaa7da81ae03052b1ec2addd20.tar.xz hypervideo-pre-d2c8aadf799a63aaa7da81ae03052b1ec2addd20.zip |
[cleanup] Misc
Closes #4710, Closes #4754, Closes #4723
Authored by: pukkandan, MrRawes, DavidH-2022
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 2b5b3fdfc..a6bbbb128 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1044,7 +1044,7 @@ class YoutubeDL: def get_output_path(self, dir_type='', filename=None): paths = self.params.get('paths', {}) - assert isinstance(paths, dict) + assert isinstance(paths, dict), '"paths" parameter must be a dictionary' path = os.path.join( expand_path(paths.get('home', '').strip()), expand_path(paths.get(dir_type, '').strip()) if dir_type else '', @@ -2745,9 +2745,9 @@ class YoutubeDL: if lang not in available_subs: available_subs[lang] = cap_info - if (not self.params.get('writesubtitles') and not - self.params.get('writeautomaticsub') or not - available_subs): + if not available_subs or ( + not self.params.get('writesubtitles') + and not self.params.get('writeautomaticsub')): return None all_sub_langs = tuple(available_subs.keys()) @@ -2764,7 +2764,7 @@ class YoutubeDL: else: requested_langs = ['en'] if 'en' in all_sub_langs else all_sub_langs[:1] if requested_langs: - self.write_debug('Downloading subtitles: %s' % ', '.join(requested_langs)) + self.to_screen(f'[info] {video_id}: Downloading subtitles: {", ".join(requested_langs)}') formats_query = self.params.get('subtitlesformat', 'best') formats_preference = formats_query.split('/') if formats_query else [] |