Merge pull request #400 from wb9688/skip-otf

Do not list YouTube's OTF streams
This commit is contained in:
Stypox 2020-09-29 20:16:34 +02:00 committed by GitHub
commit 2463884aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -957,6 +957,13 @@ public class YoutubeStreamExtractor extends StreamExtractor {
try {
ItagItem itagItem = ItagItem.getItag(itag);
if (itagItem.itagType == itagTypeWanted) {
// Ignore streams that are delivered using YouTube's OTF format,
// as those only work with DASH and not with progressive HTTP.
if (formatData.getString("type", EMPTY_STRING)
.equalsIgnoreCase("FORMAT_STREAM_TYPE_OTF")) {
continue;
}
String streamUrl;
if (formatData.has("url")) {
streamUrl = formatData.getString("url");