mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 06:10:33 +05:30
fix crash when return null as a related streams collector
This commit is contained in:
parent
2148edc7d7
commit
7fcb3f5790
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user