[YouTube] Detect LIVE videos in the trending page
This commit is contained in:
@@ -63,6 +63,15 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ignored) {}
|
} 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;
|
return StreamType.VIDEO_STREAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user