Skip to content

Commit 0d8fb65

Browse files
committed
Fix NPE on determining whether stream is live on Youtube
1 parent 4453a63 commit 0d8fb65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ public StreamType getStreamType() throws ParsingException {
523523
assertPageFetched();
524524
try {
525525
if (playerArgs != null && (playerArgs.has("ps") && playerArgs.get("ps").toString().equals("live") ||
526-
playerResponse.getObject("streamingData").getArray(FORMATS).isEmpty())) {
526+
(!playerResponse.getObject("streamingData").has(FORMATS)))) {
527527
return StreamType.LIVE_STREAM;
528528
}
529529
} catch (Exception e) {

0 commit comments

Comments
 (0)