Fix NPE on determining whether stream is live on Youtube
This commit is contained in:
parent
4453a63447
commit
0d8fb65003
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue