Adress requested changes in other classes
This commit is contained in:
parent
accd5ddef3
commit
cc798523cd
2 changed files with 6 additions and 9 deletions
|
@ -98,11 +98,11 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
||||||
|
|
||||||
if (jsonResponse.has("error")) {
|
if (jsonResponse.has("error")) {
|
||||||
if (jsonResponse.getInt("code") == 404) {
|
if (jsonResponse.getInt("code") == 404) {
|
||||||
throw new ContentNotAvailableException("No channel associated with this user"
|
throw new ContentNotAvailableException(
|
||||||
+ "exists");
|
"No channel associated with this user exists");
|
||||||
} else {
|
} else {
|
||||||
throw new ContentNotAvailableException("Got error:\""
|
throw new ContentNotAvailableException("Got error:\""
|
||||||
+ jsonResponse.getString("status") + "\""
|
+ jsonResponse.getString("status") + "\": "
|
||||||
+ jsonResponse.getString("message"));
|
+ jsonResponse.getString("message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
||||||
throw new ContentNotAvailableException("This channel doesn't exist.");
|
throw new ContentNotAvailableException("This channel doesn't exist.");
|
||||||
} else {
|
} else {
|
||||||
throw new ContentNotAvailableException("Got error:\""
|
throw new ContentNotAvailableException("Got error:\""
|
||||||
+ jsonResponse.getString("status") + "\""
|
+ jsonResponse.getString("status") + "\": "
|
||||||
+ jsonResponse.getString("message"));
|
+ jsonResponse.getString("message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,8 @@ public class YoutubeSearchQueryHandlerFactory extends SearchQueryHandlerFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSearchParameter(final String contentFilter) {
|
public static String getSearchParameter(final String contentFilter) {
|
||||||
if (!isNullOrEmpty(contentFilter)) {
|
if (isNullOrEmpty(contentFilter)) return "";
|
||||||
switch (contentFilter) {
|
switch (contentFilter) {
|
||||||
case VIDEOS:
|
case VIDEOS:
|
||||||
return "EgIQAQ%3D%3D";
|
return "EgIQAQ%3D%3D";
|
||||||
case CHANNELS:
|
case CHANNELS:
|
||||||
|
@ -91,9 +91,6 @@ public class YoutubeSearchQueryHandlerFactory extends SearchQueryHandlerFactory
|
||||||
case MUSIC_ARTISTS:
|
case MUSIC_ARTISTS:
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue