Skip to content

Commit

Permalink
Adress requested changes in other classes
Browse files Browse the repository at this point in the history
  • Loading branch information
AudricV committed Jun 15, 2021
1 parent 4f6c6ae commit e4f3f02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public void onFetchPage(@Nonnull final Downloader downloader) throws IOException

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"));
}
}
Expand Down Expand Up @@ -149,7 +149,7 @@ public void onFetchPage(@Nonnull final Downloader downloader) throws IOException
throw new ContentNotAvailableException("This channel doesn't exist.");
} else {
throw new ContentNotAvailableException("Got error:\""
+ jsonResponse.getString("status") + "\""
+ jsonResponse.getString("status") + "\": "
+ jsonResponse.getString("message"));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public String[] getAvailableContentFilter() {
}

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:
Expand All @@ -91,9 +91,6 @@ public static String getSearchParameter(final String contentFilter) {
case MUSIC_ARTISTS:
default:
return "";
}
} else {
return "";
}
}
}

0 comments on commit e4f3f02

Please sign in to comment.