diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/linkHandler/PeertubeSearchQueryHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/linkHandler/PeertubeSearchQueryHandlerFactory.java index a660a5bcc..861ddcb66 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/linkHandler/PeertubeSearchQueryHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/peertube/linkHandler/PeertubeSearchQueryHandlerFactory.java @@ -35,10 +35,7 @@ public class PeertubeSearchQueryHandlerFactory extends SearchQueryHandlerFactory @Override public String getUrl(String searchString, List contentFilters, String sortFilter, String baseUrl) throws ParsingException { try { - final String url = baseUrl + SEARCH_ENDPOINT - + "?search=" + URLEncoder.encode(searchString, UTF_8); - - return url; + return baseUrl + SEARCH_ENDPOINT + "?search=" + URLEncoder.encode(searchString, UTF_8); } catch (UnsupportedEncodingException e) { throw new ParsingException("Could not encode query", e); } diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java index edd459534..07db99a36 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java @@ -221,6 +221,7 @@ public class YoutubeService extends StreamingService { return SUPPORTED_LANGUAGES; } + @Override public List getSupportedCountries() { return SUPPORTED_COUNTRIES; } diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java b/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java index 7ff8ad9ee..cadd69ccc 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java @@ -10,6 +10,7 @@ import org.schabi.newpipe.extractor.utils.ExtractorHelper; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Locale; @@ -153,11 +154,11 @@ public class StreamInfo extends Info { // Lists can be null if a exception was thrown during extraction if (streamInfo.getVideoStreams() == null) - streamInfo.setVideoStreams(new ArrayList()); + streamInfo.setVideoStreams(Collections.emptyList()); if (streamInfo.getVideoOnlyStreams() == null) - streamInfo.setVideoOnlyStreams(new ArrayList()); + streamInfo.setVideoOnlyStreams(Collections.emptyList()); if (streamInfo.getAudioStreams() == null) - streamInfo.setAudioStreams(new ArrayList()); + streamInfo.setAudioStreams(Collections.emptyList()); Exception dashMpdError = null; if (!isNullOrEmpty(streamInfo.getDashMpdUrl())) {