Skip to content

Commit 5abea22

Browse files
committed
Fix throwing correct reason.
1 parent 4680df0 commit 5abea22

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,8 @@ private void checkPlayabilityStatus(final JsonObject youtubePlayerResponse,
964964
if (detailedErrorMessage != null && detailedErrorMessage.contains("country")) {
965965
throw new GeographicRestrictionException(
966966
"This video is not available in client's country.");
967+
} else if (detailedErrorMessage != null) {
968+
throw new ContentNotAvailableException(detailedErrorMessage);
967969
} else {
968970
throw new ContentNotAvailableException(reason);
969971
}

0 commit comments

Comments
 (0)