Merge pull request #1020 from TeamNewPipe/fix/yt-subscriber-count

[YouTube] Fix NPE in search when getting channel items without subscriber count
pull/1021/head
Stypox 2023-01-29 09:44:22 +01:00 zatwierdzone przez GitHub
commit 76eeabac45
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -96,8 +96,12 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor
}
if (withHandle) {
return Utils.mixedNumberWordToLong(getTextFromObject(
channelInfoItem.getObject("videoCountText")));
if (channelInfoItem.has("videoCountText")) {
return Utils.mixedNumberWordToLong(getTextFromObject(
channelInfoItem.getObject("videoCountText")));
} else {
return -1;
}
}
return Utils.mixedNumberWordToLong(getTextFromObject(