Skip to content

Commit cc79852

Browse files
committed
Adress requested changes in other classes
1 parent accd5dd commit cc79852

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeChannelExtractor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ public void onFetchPage(@Nonnull final Downloader downloader) throws IOException
9898

9999
if (jsonResponse.has("error")) {
100100
if (jsonResponse.getInt("code") == 404) {
101-
throw new ContentNotAvailableException("No channel associated with this user"
102-
+ "exists");
101+
throw new ContentNotAvailableException(
102+
"No channel associated with this user exists");
103103
} else {
104104
throw new ContentNotAvailableException("Got error:\""
105-
+ jsonResponse.getString("status") + "\""
105+
+ jsonResponse.getString("status") + "\": "
106106
+ jsonResponse.getString("message"));
107107
}
108108
}
@@ -149,7 +149,7 @@ public void onFetchPage(@Nonnull final Downloader downloader) throws IOException
149149
throw new ContentNotAvailableException("This channel doesn't exist.");
150150
} else {
151151
throw new ContentNotAvailableException("Got error:\""
152-
+ jsonResponse.getString("status") + "\""
152+
+ jsonResponse.getString("status") + "\": "
153153
+ jsonResponse.getString("message"));
154154
}
155155
}

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeSearchQueryHandlerFactory.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public String[] getAvailableContentFilter() {
7575
}
7676

7777
public static String getSearchParameter(final String contentFilter) {
78-
if (!isNullOrEmpty(contentFilter)) {
79-
switch (contentFilter) {
78+
if (isNullOrEmpty(contentFilter)) return "";
79+
switch (contentFilter) {
8080
case VIDEOS:
8181
return "EgIQAQ%3D%3D";
8282
case CHANNELS:
@@ -91,9 +91,6 @@ public static String getSearchParameter(final String contentFilter) {
9191
case MUSIC_ARTISTS:
9292
default:
9393
return "";
94-
}
95-
} else {
96-
return "";
9794
}
9895
}
9996
}

0 commit comments

Comments
 (0)