From ca875b39ac35ac1499c303672f7217e2a7bbcab1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 19 Jun 2021 14:10:44 +0200 Subject: Fix youtube audio download downloading video when not needed --- src/plugins/Youtube.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/Youtube.cpp') diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 717bc8f..11ff7fa 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -1983,6 +1983,8 @@ R"END( // Sometimes youtube returns a redirect url (not in the header but in the body...). // TODO: Find why this happens and if there is a way bypass it. + // Or maybe move this logic to QuickMedia video_content_page when mpv fails to start up (mpv will exit with exit code 2 and the message "Failed to recognize file format." when this happens). + // But that might be too slow for pinephone. static std::string get_playback_url_recursive(std::string playback_url) { const int max_redirects = 5; for(int i = 0; i < max_redirects; ++i) { -- cgit v1.2.3