[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:
parent
137e924035
commit
aaf3231fc7
|
@ -95,9 +95,11 @@ public class MediaCCCConferenceExtractor extends ChannelExtractor {
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public List<ListLinkHandler> getTabs() throws ParsingException {
|
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,
|
return List.of(new ReadyChannelTabListLinkHandler(getUrl(), getId(), ChannelTabs.VIDEOS,
|
||||||
(service, linkHandler) ->
|
(service, linkHandler) ->
|
||||||
new MediaCCCChannelTabExtractor(service, linkHandler, conferenceData)));
|
new MediaCCCChannelTabExtractor(service, linkHandler, theConferenceData)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue