[YouTube] Remove GEMA exception handling (#202)

This commit is contained in:
Tobias Groza 2019-10-05 14:59:05 +02:00 committed by GitHub
parent b9c0d71210
commit 06f2144e4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 15 deletions

View File

@ -66,12 +66,6 @@ public class YoutubeStreamExtractor extends StreamExtractor {
}
}
public class GemaException extends ContentNotAvailableException {
GemaException(String message) {
super(message);
}
}
public class SubtitlesException extends ContentNotAvailableException {
SubtitlesException(String message, Throwable cause) {
super(message, cause);
@ -584,12 +578,6 @@ public class YoutubeStreamExtractor extends StreamExtractor {
String errorMessage = errorElement.text();
if (errorMessage == null || errorMessage.isEmpty()) {
errorReason = null;
} else if (errorMessage.contains("GEMA")) {
// Gema sometimes blocks youtube music content in germany:
// https://www.gema.de/en/
// Detailed description:
// https://en.wikipedia.org/wiki/GEMA_%28German_organization%29
errorReason = new StringBuilder("GEMA");
} else {
errorReason = new StringBuilder(errorMessage);
errorReason.append(" ");
@ -670,8 +658,6 @@ public class YoutubeStreamExtractor extends StreamExtractor {
} catch (Parser.RegexException e) {
String errorReason = getErrorMessage();
switch (errorReason) {
case "GEMA":
throw new GemaException(errorReason);
case "":
throw new ContentNotAvailableException("Content not available: player config empty", e);
default:

View File

@ -270,7 +270,7 @@ public abstract class StreamExtractor extends Extractor {
}
/**
* Should analyse the webpage's document and extracts any error message there might be. (e.g. GEMA block)
* Should analyse the webpage's document and extracts any error message there might be.
*
* @return Error message; null if there is no error message.
*/