mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 06:10:33 +05:30
[YouTube] Detect LIVE videos in the trending page
This commit is contained in:
parent
6446abc6d1
commit
1ef706f567
@ -63,6 +63,15 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
|
||||
}
|
||||
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
try {
|
||||
final String style = videoInfo.getArray("thumbnailOverlays").getObject(0)
|
||||
.getObject("thumbnailOverlayTimeStatusRenderer").getString("style");
|
||||
if (style.equalsIgnoreCase("LIVE")) {
|
||||
return StreamType.LIVE_STREAM;
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
return StreamType.VIDEO_STREAM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user