Fixed NullPointerException in YoutubeSearchQueryHandlerFactory
This commit is contained in:
parent
1f08d28ae5
commit
2aae9f52d5
|
@ -43,19 +43,21 @@ public final class YoutubeSearchQueryHandlerFactory extends SearchQueryHandlerFa
|
||||||
try {
|
try {
|
||||||
if (!contentFilters.isEmpty()) {
|
if (!contentFilters.isEmpty()) {
|
||||||
final String contentFilter = contentFilters.get(0);
|
final String contentFilter = contentFilters.get(0);
|
||||||
switch (contentFilter) {
|
if (contentFilter != null) {
|
||||||
case VIDEOS:
|
switch (contentFilter) {
|
||||||
return SEARCH_URL + encodeUrlUtf8(searchString) + "&sp=EgIQAQ%253D%253D";
|
case VIDEOS:
|
||||||
case CHANNELS:
|
return SEARCH_URL + encodeUrlUtf8(searchString) + "&sp=EgIQAQ%253D%253D";
|
||||||
return SEARCH_URL + encodeUrlUtf8(searchString) + "&sp=EgIQAg%253D%253D";
|
case CHANNELS:
|
||||||
case PLAYLISTS:
|
return SEARCH_URL + encodeUrlUtf8(searchString) + "&sp=EgIQAg%253D%253D";
|
||||||
return SEARCH_URL + encodeUrlUtf8(searchString) + "&sp=EgIQAw%253D%253D";
|
case PLAYLISTS:
|
||||||
case MUSIC_SONGS:
|
return SEARCH_URL + encodeUrlUtf8(searchString) + "&sp=EgIQAw%253D%253D";
|
||||||
case MUSIC_VIDEOS:
|
case MUSIC_SONGS:
|
||||||
case MUSIC_ALBUMS:
|
case MUSIC_VIDEOS:
|
||||||
case MUSIC_PLAYLISTS:
|
case MUSIC_ALBUMS:
|
||||||
case MUSIC_ARTISTS:
|
case MUSIC_PLAYLISTS:
|
||||||
return MUSIC_SEARCH_URL + encodeUrlUtf8(searchString);
|
case MUSIC_ARTISTS:
|
||||||
|
return MUSIC_SEARCH_URL + encodeUrlUtf8(searchString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue