Skip to content

Commit 9de8405

Browse files
committed
[YouTube] Fix extracting the detailed error message of streams which are unavailable
1 parent c953e23 commit 9de8405

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,8 @@ private void checkPlayabilityStatus(final JsonObject youtubePlayerResponse,
943943
}
944944
}
945945

946-
if (status.equalsIgnoreCase("unplayable") && reason != null) {
946+
if ((status.equalsIgnoreCase("unplayable") || status.equalsIgnoreCase("error"))
947+
&& reason != null) {
947948
if (reason.contains("Music Premium")) {
948949
throw new YoutubeMusicPremiumContentException();
949950
}

0 commit comments

Comments
 (0)