Always return a new item collector in the search extractor
This commit is contained in:
parent
0c27198ba1
commit
d72130edae
|
@ -17,11 +17,8 @@ public abstract class SearchExtractor extends ListExtractor<InfoItem> {
|
|||
}
|
||||
}
|
||||
|
||||
private final InfoItemsSearchCollector collector;
|
||||
|
||||
public SearchExtractor(StreamingService service, SearchQueryHandler linkHandler) {
|
||||
super(service, linkHandler);
|
||||
collector = new InfoItemsSearchCollector(service.getServiceId());
|
||||
}
|
||||
|
||||
public String getSearchString() {
|
||||
|
@ -31,7 +28,7 @@ public abstract class SearchExtractor extends ListExtractor<InfoItem> {
|
|||
public abstract String getSearchSuggestion() throws ParsingException;
|
||||
|
||||
protected InfoItemsSearchCollector getInfoItemSearchCollector() {
|
||||
return collector;
|
||||
return new InfoItemsSearchCollector(getService().getServiceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,8 +47,7 @@ public class MediaCCCSearchExtractor extends SearchExtractor {
|
|||
@Nonnull
|
||||
@Override
|
||||
public InfoItemsPage<InfoItem> getInitialPage() throws IOException, ExtractionException {
|
||||
InfoItemsSearchCollector searchItems = getInfoItemSearchCollector();
|
||||
searchItems.reset();
|
||||
final InfoItemsSearchCollector searchItems = getInfoItemSearchCollector();
|
||||
|
||||
if (getLinkHandler().getContentFilters().contains(CONFERENCES)
|
||||
|| getLinkHandler().getContentFilters().contains(ALL)
|
||||
|
|
|
@ -79,7 +79,6 @@ public class SoundcloudSearchExtractor extends SearchExtractor {
|
|||
|
||||
private InfoItemsCollector<InfoItem, InfoItemExtractor> collectItems(JsonArray searchCollection) {
|
||||
final InfoItemsSearchCollector collector = getInfoItemSearchCollector();
|
||||
collector.reset();
|
||||
|
||||
for (Object result : searchCollection) {
|
||||
if (!(result instanceof JsonObject)) continue;
|
||||
|
|
Loading…
Reference in New Issue