From 5dee69885104436824686e5f5c4293773d2a7f0f Mon Sep 17 00:00:00 2001 From: pidoubleyou Date: Sat, 23 Mar 2024 16:32:07 +0100 Subject: [PATCH] configure topics search --- .../mserver/crawler/orfon/OrfOnCrawler.java | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/main/java/de/mediathekview/mserver/crawler/orfon/OrfOnCrawler.java b/src/main/java/de/mediathekview/mserver/crawler/orfon/OrfOnCrawler.java index 2f6c333f5..00894ef43 100644 --- a/src/main/java/de/mediathekview/mserver/crawler/orfon/OrfOnCrawler.java +++ b/src/main/java/de/mediathekview/mserver/crawler/orfon/OrfOnCrawler.java @@ -56,19 +56,24 @@ protected RecursiveTask> createCrawlerTask() { allVideos.addAll(epsiodesFromDay); printMessage(ServerMessages.DEBUG_ALL_SENDUNG_FOLGEN_COUNT, getSender().getName(), allVideos.size()); getAndSetMaxCount(allVideos.size()); - // - // Sendungen a-z - // Buchstabe > Episoden > Episode2Film - final Set videosFromTopics = processAZUrlsToCrawl(); - allVideos.addAll(videosFromTopics); - printMessage(ServerMessages.DEBUG_ALL_SENDUNG_FOLGEN_COUNT, getSender().getName(), allVideos.size()); - getAndSetMaxCount(allVideos.size()); - // - // History (top categories) > children > VideoItem > Episode > Episode2Film - final Set historyVideos = processHistoryUrlToCrawl(); - allVideos.addAll(historyVideos); - printMessage(ServerMessages.DEBUG_ALL_SENDUNG_FOLGEN_COUNT, getSender().getName(), allVideos.size()); - getAndSetMaxCount(allVideos.size()); + + if (Boolean.TRUE.equals(crawlerConfig.getTopicsSearchEnabled())) { + // + // Sendungen a-z + // Buchstabe > Episoden > Episode2Film + final Set videosFromTopics = processAZUrlsToCrawl(); + allVideos.addAll(videosFromTopics); + printMessage( + ServerMessages.DEBUG_ALL_SENDUNG_FOLGEN_COUNT, getSender().getName(), allVideos.size()); + getAndSetMaxCount(allVideos.size()); + // + // History (top categories) > children > VideoItem > Episode > Episode2Film + final Set historyVideos = processHistoryUrlToCrawl(); + allVideos.addAll(historyVideos); + printMessage( + ServerMessages.DEBUG_ALL_SENDUNG_FOLGEN_COUNT, getSender().getName(), allVideos.size()); + getAndSetMaxCount(allVideos.size()); + } // return new OrfOnEpisodeTask(this, new ConcurrentLinkedQueue<>(allVideos)); } catch (final Exception ex) {