2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-30 22:05:18 +00:00

[MediaCCC] Fix lambda link handler keeping reference to extractor

This caused problems in NewPipe, because extractors are not serializable, and well, keeping references to them is a bad idea anyway.
This commit is contained in:
Stypox
2023-12-30 23:23:19 +01:00
parent 137e924035
commit aaf3231fc7

View File

@@ -95,9 +95,11 @@ public class MediaCCCConferenceExtractor extends ChannelExtractor {
@Nonnull
@Override
public List<ListLinkHandler> getTabs() throws ParsingException {
// avoid keeping a reference to MediaCCCConferenceExtractor inside the lambda
final JsonObject theConferenceData = conferenceData;
return List.of(new ReadyChannelTabListLinkHandler(getUrl(), getId(), ChannelTabs.VIDEOS,
(service, linkHandler) ->
new MediaCCCChannelTabExtractor(service, linkHandler, conferenceData)));
new MediaCCCChannelTabExtractor(service, linkHandler, theConferenceData)));
}
@Override