diff options
Diffstat (limited to 'youtube/watch.py')
-rw-r--r-- | youtube/watch.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py index 886f2a4..3533f30 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -176,7 +176,7 @@ def make_caption_src(info, lang, auto=False, trans_lang=None): if trans_lang: label += ' -> ' + trans_lang return { - 'url': '/' + yt_data_extract.get_caption_url(info, lang, 'vtt', auto, trans_lang), + 'url': util.prefix_url(yt_data_extract.get_caption_url(info, lang, 'vtt', auto, trans_lang)), 'label': label, 'srclang': trans_lang[0:2] if trans_lang else lang[0:2], 'on': False, @@ -220,6 +220,8 @@ def get_subtitle_sources(info): pref_lang (Automatic) pref_lang (Manual)''' sources = [] + if not yt_data_extract.captions_available(info): + return [] pref_lang = settings.subtitles_language native_video_lang = None if info['automatic_caption_languages']: |