fix: NPE when extracting YT stream items without duration
This commit is contained in:
parent
f3b064a3b3
commit
0a458d8948
|
@ -141,6 +141,10 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
|
|||
// example: "simple is best - 49 seconds - play video"
|
||||
final String accessibilityLabel = videoInfo.getObject("accessibility")
|
||||
.getObject("accessibilityData").getString("label");
|
||||
if (accessibilityLabel == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
final String[] labelParts = accessibilityLabel.split(" \u2013 ");
|
||||
|
||||
if (labelParts.length > 2) {
|
||||
|
|
Loading…
Reference in New Issue