From e69e975d16cd80f5494cfe7d566f8ae865ab43cc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 27 Aug 2021 21:54:42 +0200 Subject: Youtube: include en-US subtitles --- src/plugins/Youtube.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 6c080c5..6a96595 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -2506,8 +2506,16 @@ R"END( void YoutubeVideoPage::get_subtitles(SubtitleData &subtitle_data) { auto it = subtitle_urls_by_lang_code.find("en"); - if(it != subtitle_urls_by_lang_code.end()) + if(it != subtitle_urls_by_lang_code.end()) { subtitle_data = it->second; + return; + } + + it = subtitle_urls_by_lang_code.find("en-US"); + if(it != subtitle_urls_by_lang_code.end()) { + subtitle_data = it->second; + return; + } } static bool parse_cipher_format(const Json::Value &format, YoutubeFormat &youtube_format) { -- cgit v1.2.3