Fix throwing correct reason.
This commit is contained in:
parent
4680df0bdf
commit
5abea22225
|
@ -964,6 +964,8 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
|||
if (detailedErrorMessage != null && detailedErrorMessage.contains("country")) {
|
||||
throw new GeographicRestrictionException(
|
||||
"This video is not available in client's country.");
|
||||
} else if (detailedErrorMessage != null) {
|
||||
throw new ContentNotAvailableException(detailedErrorMessage);
|
||||
} else {
|
||||
throw new ContentNotAvailableException(reason);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue