Fix NPE on determining whether stream is live on Youtube

This commit is contained in:
Stypox 2019-09-12 15:07:07 +02:00
parent 4453a63447
commit 0d8fb65003
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 1 additions and 1 deletions

View File

@ -523,7 +523,7 @@ public class YoutubeStreamExtractor extends StreamExtractor {
assertPageFetched(); assertPageFetched();
try { try {
if (playerArgs != null && (playerArgs.has("ps") && playerArgs.get("ps").toString().equals("live") || if (playerArgs != null && (playerArgs.has("ps") && playerArgs.get("ps").toString().equals("live") ||
playerResponse.getObject("streamingData").getArray(FORMATS).isEmpty())) { (!playerResponse.getObject("streamingData").has(FORMATS)))) {
return StreamType.LIVE_STREAM; return StreamType.LIVE_STREAM;
} }
} catch (Exception e) { } catch (Exception e) {