diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-08-27 21:54:42 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-08-27 21:54:42 +0200 |
commit | e69e975d16cd80f5494cfe7d566f8ae865ab43cc (patch) | |
tree | ed6889f4bd97d8f5cef48a7a25979ff80f50d99b /src/plugins | |
parent | b3c69f4cbfc11b15c2725f5c71465860694d5933 (diff) |
Youtube: include en-US subtitles
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Youtube.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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) { |