diff --git a/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiFilmeModelHelper.java b/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiFilmeModelHelper.java index bc12df66c2..4084a24624 100644 --- a/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiFilmeModelHelper.java +++ b/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiFilmeModelHelper.java @@ -33,37 +33,6 @@ public GuiFilmeModelHelper(@NotNull FilterActionPanel filterActionPanel, this.searchFieldData = searchFieldData; } - private String getFilterThema() { - String filterThema = filterActionPanel.getViewSettingsPane().themaComboBox.getSelectionModel().getSelectedItem(); - if (filterThema == null) { - filterThema = ""; - } - - return filterThema; - } - - @Override - protected boolean noFiltersAreSet() { - var filmLengthSlider = filterActionPanel.getFilmLengthSlider(); - - return filterActionPanel.getViewSettingsPane().senderCheckList.getCheckModel().isEmpty() - && getFilterThema().isEmpty() - && searchFieldData.isEmpty() - && ((int) filmLengthSlider.getLowValue() == 0) - && ((int) filmLengthSlider.getHighValue() == FilmLengthSlider.UNLIMITED_VALUE) - && !filterActionPanel.isDontShowAbos() - && !filterActionPanel.isShowUnseenOnly() - && !filterActionPanel.isShowOnlyHighQuality() - && !filterActionPanel.isShowSubtitlesOnly() - && !filterActionPanel.isShowLivestreamsOnly() - && !filterActionPanel.isShowNewOnly() - && !filterActionPanel.isShowBookMarkedOnly() - && !filterActionPanel.isDontShowTrailers() - && !filterActionPanel.isDontShowSignLanguage() - && !filterActionPanel.isDontShowAudioVersions(); - } - - private void performTableFiltering() { arrIrgendwo = searchFieldData.evaluateThemaTitel(); diff --git a/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiModelHelper.java b/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiModelHelper.java index a6eb4d0b08..21284cc1dc 100644 --- a/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiModelHelper.java +++ b/src/main/java/mediathek/gui/tabs/tab_film/helpers/GuiModelHelper.java @@ -3,7 +3,9 @@ import mediathek.controller.history.SeenHistoryController; import mediathek.daten.DatenFilm; import mediathek.gui.tabs.tab_film.SearchFieldData; +import mediathek.javafx.filterpanel.FilmLengthSlider; import mediathek.javafx.filterpanel.FilterActionPanel; +import mediathek.javafx.filterpanel.ZeitraumSpinner; import javax.swing.table.TableModel; import java.util.concurrent.TimeUnit; @@ -34,7 +36,26 @@ protected boolean minLengthCheck(DatenFilm film) { return filmLength >= sliderRange.minLengthInSeconds(); } - protected abstract boolean noFiltersAreSet(); + protected boolean noFiltersAreSet() { + var filmLengthSlider = filterActionPanel.getFilmLengthSlider(); + + return filterActionPanel.getViewSettingsPane().senderCheckList.getCheckModel().isEmpty() + && getFilterThema().isEmpty() + && searchFieldData.isEmpty() + && ((int) filmLengthSlider.getLowValue() == 0) + && ((int) filmLengthSlider.getHighValue() == FilmLengthSlider.UNLIMITED_VALUE) + && !filterActionPanel.isDontShowAbos() + && !filterActionPanel.isShowUnseenOnly() + && !filterActionPanel.isShowOnlyHighQuality() + && !filterActionPanel.isShowSubtitlesOnly() + && !filterActionPanel.isShowLivestreamsOnly() + && !filterActionPanel.isShowNewOnly() + && !filterActionPanel.isShowBookMarkedOnly() + && !filterActionPanel.isDontShowTrailers() + && !filterActionPanel.isDontShowSignLanguage() + && !filterActionPanel.isDontShowAudioVersions() + && filterActionPanel.zeitraumProperty().get().equalsIgnoreCase(ZeitraumSpinner.UNLIMITED_VALUE); + } protected boolean seenCheck(DatenFilm film) { return !historyController.hasBeenSeenFromCache(film); @@ -47,4 +68,10 @@ protected void calculateFilmLengthSliderValues() { var maxLengthInSeconds = TimeUnit.SECONDS.convert(maxLength, TimeUnit.MINUTES); sliderRange = new SliderRange(minLengthInSeconds, maxLengthInSeconds); } + + protected String getFilterThema() { + String filterThema = filterActionPanel.getViewSettingsPane().themaComboBox.getSelectionModel().getSelectedItem(); + + return filterThema == null ? "" : filterThema; + } } diff --git a/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java b/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java index f2898ca256..c2f512bb35 100644 --- a/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java +++ b/src/main/java/mediathek/gui/tabs/tab_film/helpers/LuceneGuiFilmeModelHelper.java @@ -54,38 +54,6 @@ public LuceneGuiFilmeModelHelper(@NotNull FilterActionPanel filterActionPanel, this.searchFieldData = searchFieldData; } - private String getFilterThema() { - String filterThema = filterActionPanel.getViewSettingsPane().themaComboBox.getSelectionModel().getSelectedItem(); - if (filterThema == null) { - filterThema = ""; - } - - return filterThema; - } - - @Override - protected boolean noFiltersAreSet() { - var filmLengthSlider = filterActionPanel.getFilmLengthSlider(); - - return filterActionPanel.getViewSettingsPane().senderCheckList.getCheckModel().isEmpty() - && getFilterThema().isEmpty() - && searchFieldData.isEmpty() - && ((int) filmLengthSlider.getLowValue() == 0) - && ((int) filmLengthSlider.getHighValue() == FilmLengthSlider.UNLIMITED_VALUE) - && !filterActionPanel.isDontShowAbos() - && !filterActionPanel.isShowUnseenOnly() - && !filterActionPanel.isShowOnlyHighQuality() - && !filterActionPanel.isShowSubtitlesOnly() - && !filterActionPanel.isShowLivestreamsOnly() - && !filterActionPanel.isShowNewOnly() - && !filterActionPanel.isShowBookMarkedOnly() - && !filterActionPanel.isDontShowTrailers() - && !filterActionPanel.isDontShowSignLanguage() - && !filterActionPanel.isDontShowAudioVersions() - && filterActionPanel.zeitraumProperty().get().equalsIgnoreCase(ZeitraumSpinner.UNLIMITED_VALUE); - } - - private TModelFilm performTableFiltering() { var listeFilme = (IndexedFilmList) Daten.getInstance().getListeFilmeNachBlackList(); try {