diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-03-11 12:41:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-03-11 12:41:37 +0100 |
commit | fc27e590c39e3b309683e275541fd9b3164985dc (patch) | |
tree | 4eeb9272ffd2f469f0ce2c857c2f1ec303df3da4 /src/plugins | |
parent | d92f6d7725720e3facf90b0fdefc1ef4eb1c2227 (diff) |
Fix youtube streaming for really long videos
I dedicate this one to rat
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Youtube.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 2d92cd8..b3150a3 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -2517,6 +2517,15 @@ R"END( if(!format.isObject()) continue; + if(is_adaptive) { + // TODO: Fix. Some streams use &sq=num instead of index + const Json::Value &index_range_json = format["indexRange"]; + if(index_range_json.isNull()) { + fprintf(stderr, "Ignoring adaptive stream without indexRange\n"); + continue; + } + } + // TODO: Support HDR? const Json::Value &quality_label_json = format["qualityLabel"]; if(quality_label_json.isString() && strstr(quality_label_json.asCString(), "HDR")) continue; |