From 492db83ccff20a71a24aaab94e8968be3d4fffcd Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 9 Apr 2020 21:33:28 +0200 Subject: [PATCH] [MediaCCC] Return null instead of empty items collector As per the documentation in the base getRelatedStreams() --- .../services/media_ccc/extractors/MediaCCCStreamExtractor.java | 2 +- .../services/media_ccc/MediaCCCStreamExtractorTest.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java index 2fbeb1add..193f044da 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/media_ccc/extractors/MediaCCCStreamExtractor.java @@ -219,7 +219,7 @@ public class MediaCCCStreamExtractor extends StreamExtractor { @Override public StreamInfoItemsCollector getRelatedStreams() { - return new StreamInfoItemsCollector(getServiceId()); + return null; } @Override diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCStreamExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCStreamExtractorTest.java index 6a4c4c0e2..14111304b 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCStreamExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCStreamExtractorTest.java @@ -53,6 +53,7 @@ public class MediaCCCStreamExtractorTest { @Nullable @Override public String expectedTextualUploadDate() { return "2018-05-11T02:00:00.000+02:00"; } @Override public long expectedLikeCountAtLeast() { return -1; } @Override public long expectedDislikeCountAtLeast() { return -1; } + @Override public boolean expectedHasRelatedStreams() { return false; } @Override public boolean expectedHasSubtitles() { return false; } @Override public boolean expectedHasFrames() { return false; } @@ -114,6 +115,7 @@ public class MediaCCCStreamExtractorTest { @Nullable @Override public String expectedTextualUploadDate() { return "2020-01-11T01:00:00.000+01:00"; } @Override public long expectedLikeCountAtLeast() { return -1; } @Override public long expectedDislikeCountAtLeast() { return -1; } + @Override public boolean expectedHasRelatedStreams() { return false; } @Override public boolean expectedHasSubtitles() { return false; } @Override public boolean expectedHasFrames() { return false; }