From 85e69b2125313b0c413a75316c20c6e10c35cf48 Mon Sep 17 00:00:00 2001 From: Oren Amsalem Date: Mon, 10 Feb 2020 16:47:05 +0200 Subject: [PATCH] better subtitles info in-case of nooverwrites In case a subtitle exists, it is better to output: [info] Video subtitle RP3LhqcBThg_mp4.en.vtt is already present instead of [info] Video subtitle en.vtt is already present --- youtube_dl/YoutubeDL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index f5cb46308..ebe0b2c9b 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1816,7 +1816,7 @@ class YoutubeDL(object): sub_format = sub_info['ext'] sub_filename = subtitles_filename(filename, sub_lang, sub_format, info_dict.get('ext')) if self.params.get('nooverwrites', False) and os.path.exists(encodeFilename(sub_filename)): - self.to_screen('[info] Video subtitle %s.%s is already present' % (sub_lang, sub_format)) + self.to_screen('[info] Video subtitle {} is already present'.format(os.path.basename(sub_filename))) else: self.to_screen('[info] Writing video subtitles to: ' + sub_filename) if sub_info.get('data') is not None: