Adress requested changes in other classes

This commit is contained in:
TiA4f8R 2021-06-06 15:40:45 +02:00
parent accd5ddef3
commit cc798523cd
No known key found for this signature in database
GPG Key ID: E6D3E7F5949450DD
2 changed files with 6 additions and 9 deletions

View File

@ -98,11 +98,11 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
if (jsonResponse.has("error")) {
if (jsonResponse.getInt("code") == 404) {
throw new ContentNotAvailableException("No channel associated with this user"
+ "exists");
throw new ContentNotAvailableException(
"No channel associated with this user exists");
} else {
throw new ContentNotAvailableException("Got error:\""
+ jsonResponse.getString("status") + "\""
+ jsonResponse.getString("status") + "\": "
+ jsonResponse.getString("message"));
}
}
@ -149,7 +149,7 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
throw new ContentNotAvailableException("This channel doesn't exist.");
} else {
throw new ContentNotAvailableException("Got error:\""
+ jsonResponse.getString("status") + "\""
+ jsonResponse.getString("status") + "\": "
+ jsonResponse.getString("message"));
}
}

View File

@ -75,8 +75,8 @@ public class YoutubeSearchQueryHandlerFactory extends SearchQueryHandlerFactory
}
public static String getSearchParameter(final String contentFilter) {
if (!isNullOrEmpty(contentFilter)) {
switch (contentFilter) {
if (isNullOrEmpty(contentFilter)) return "";
switch (contentFilter) {
case VIDEOS:
return "EgIQAQ%3D%3D";
case CHANNELS:
@ -91,9 +91,6 @@ public class YoutubeSearchQueryHandlerFactory extends SearchQueryHandlerFactory
case MUSIC_ARTISTS:
default:
return "";
}
} else {
return "";
}
}
}