Use badge style instead of label
This commit is contained in:
parent
58f109ddec
commit
361f142621
|
@ -63,7 +63,9 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
|
||||||
|
|
||||||
final JsonArray badges = videoInfo.getArray("badges");
|
final JsonArray badges = videoInfo.getArray("badges");
|
||||||
for (final Object badge : badges) {
|
for (final Object badge : badges) {
|
||||||
if (((JsonObject) badge).getObject("metadataBadgeRenderer").getString("label", EMPTY_STRING).equals("LIVE NOW")) {
|
final JsonObject badgeRenderer = ((JsonObject) badge).getObject("metadataBadgeRenderer");
|
||||||
|
if (badgeRenderer.getString("style", EMPTY_STRING).equals("BADGE_STYLE_TYPE_LIVE_NOW") ||
|
||||||
|
badgeRenderer.getString("label", EMPTY_STRING).equals("LIVE NOW")) {
|
||||||
return cachedStreamType = StreamType.LIVE_STREAM;
|
return cachedStreamType = StreamType.LIVE_STREAM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue