mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-13 13:50: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
|
||||
public StreamInfoItemsCollector getRelatedStreams() throws IOException, ExtractionException {
|
||||
return null;
|
||||
return new StreamInfoItemsCollector(getServiceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,6 +30,7 @@ public class ExtractorHelper {
|
||||
public static List<InfoItem> getRelatedVideosOrLogError(StreamInfo info, StreamExtractor extractor) {
|
||||
try {
|
||||
InfoItemsCollector<? extends InfoItem, ?> collector = extractor.getRelatedStreams();
|
||||
if(collector == null) return Collections.emptyList();
|
||||
info.addAllErrors(collector.getErrors());
|
||||
|
||||
//noinspection unchecked
|
||||
|
Loading…
Reference in New Issue
Block a user