Skip to content

Commit

Permalink
[MediaCCC] Fix lambda link handler keeping reference to extractor
Browse files Browse the repository at this point in the history
This caused problems in NewPipe, because extractors are not serializable, and well, keeping references to them is a bad idea anyway.
  • Loading branch information
Stypox committed Dec 30, 2023
1 parent 137e924 commit aaf3231
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ public boolean isVerified() {
@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
Expand Down

0 comments on commit aaf3231

Please sign in to comment.