mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-09-02 15:25:32 +00:00
fix crash when return null as a related streams collector
This commit is contained in:
@@ -188,7 +188,7 @@ public class MediaCCCStreamExtractor extends StreamExtractor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StreamInfoItemsCollector getRelatedStreams() throws IOException, ExtractionException {
|
public StreamInfoItemsCollector getRelatedStreams() throws IOException, ExtractionException {
|
||||||
return null;
|
return new StreamInfoItemsCollector(getServiceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -30,6 +30,7 @@ public class ExtractorHelper {
|
|||||||
public static List<InfoItem> getRelatedVideosOrLogError(StreamInfo info, StreamExtractor extractor) {
|
public static List<InfoItem> getRelatedVideosOrLogError(StreamInfo info, StreamExtractor extractor) {
|
||||||
try {
|
try {
|
||||||
InfoItemsCollector<? extends InfoItem, ?> collector = extractor.getRelatedStreams();
|
InfoItemsCollector<? extends InfoItem, ?> collector = extractor.getRelatedStreams();
|
||||||
|
if(collector == null) return Collections.emptyList();
|
||||||
info.addAllErrors(collector.getErrors());
|
info.addAllErrors(collector.getErrors());
|
||||||
|
|
||||||
//noinspection unchecked
|
//noinspection unchecked
|
||||||
|
Reference in New Issue
Block a user