Skip to content

Commit 2463884

Browse files
authored
Merge pull request #400 from wb9688/skip-otf
Do not list YouTube's OTF streams
2 parents 6633f26 + ebbfe7f commit 2463884

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,13 @@ private Map<String, ItagItem> getItags(String streamingDataKey, ItagItem.ItagTyp
957957
try {
958958
ItagItem itagItem = ItagItem.getItag(itag);
959959
if (itagItem.itagType == itagTypeWanted) {
960+
// Ignore streams that are delivered using YouTube's OTF format,
961+
// as those only work with DASH and not with progressive HTTP.
962+
if (formatData.getString("type", EMPTY_STRING)
963+
.equalsIgnoreCase("FORMAT_STREAM_TYPE_OTF")) {
964+
continue;
965+
}
966+
960967
String streamUrl;
961968
if (formatData.has("url")) {
962969
streamUrl = formatData.getString("url");

0 commit comments

Comments
 (0)