diff --git a/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.java b/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.java index e4f7866132..5402e6820b 100644 --- a/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.java +++ b/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.java @@ -13,6 +13,7 @@ import net.miginfocom.layout.CC; import net.miginfocom.layout.LC; import net.miginfocom.swing.MigLayout; +import org.apache.commons.configuration2.Configuration; import org.jdesktop.swingx.VerticalLayout; import javax.swing.*; @@ -28,6 +29,7 @@ public class PanelFilmlisteLaden extends JPanel { private final List senderCbList = new ArrayList<>(); + private final Configuration config = ApplicationConfiguration.getConfiguration(); private void initReloadButton() { btnReloadFilmlist.setIcon(SVGIconUtilities.createSVGIcon("icons/fontawesome/arrows-rotate.svg")); @@ -74,6 +76,13 @@ public PanelFilmlisteLaden(boolean inSettingsDialog) { jButtonDateiAuswaehlen.setEnabled(selected); jCheckBoxUpdate.setEnabled(selected); }); + + // Duplicate evaluation + var enableDuplicateEvaluation = config.getBoolean( + ApplicationConfiguration.FILM_EVALUATE_DUPLICATES, true); + cbEvaluateDuplicates.setSelected(enableDuplicateEvaluation); + cbEvaluateDuplicates.addActionListener(l -> config.setProperty(ApplicationConfiguration.FILM_EVALUATE_DUPLICATES, + cbEvaluateDuplicates.isSelected())); } /** @@ -86,7 +95,6 @@ private void prepareSettingsLayout() { } private void setupCheckBoxes() { - final var config = ApplicationConfiguration.getConfiguration(); cbSign.setSelected(config.getBoolean(ApplicationConfiguration.FilmList.LOAD_SIGN_LANGUAGE,true)); cbSign.addActionListener(e -> config.setProperty(ApplicationConfiguration.FilmList.LOAD_SIGN_LANGUAGE,cbSign.isSelected())); @@ -251,6 +259,8 @@ private void initComponents() { jRadioButtonManuell = new JRadioButton(); var separator1 = new JSeparator(); var panel3 = new JPanel(); + panel4 = new JPanel(); + cbEvaluateDuplicates = new JCheckBox(); var panel2 = new JPanel(); var label1 = new JLabel(); var jSpinnerDays = new DaysSpinner(); @@ -302,6 +312,7 @@ private void initComponents() { .gap() .gap() .gap() + .gap() )); //======== jPanelAuto ======== @@ -370,6 +381,17 @@ private void initComponents() { panel3.setBorder(new TitledBorder("Einschr\u00e4nkungen f\u00fcr das Laden der Filmliste")); //NON-NLS panel3.setLayout(new VerticalLayout()); + //======== panel4 ======== + { + panel4.setBorder(new TitledBorder("Duplikate (\u00c4nderungen erfordern Neuladen der Filmliste)")); //NON-NLS + panel4.setLayout(new VerticalLayout()); + + //---- cbEvaluateDuplicates ---- + cbEvaluateDuplicates.setText("Erkennung beim Laden der Filmliste einschalten"); //NON-NLS + panel4.add(cbEvaluateDuplicates); + } + panel3.add(panel4); + //======== panel2 ======== { panel2.setLayout(new MigLayout( @@ -577,6 +599,8 @@ private void initComponents() { private JCheckBox jCheckBoxUpdate; private JRadioButton jRadioButtonAuto; private JRadioButton jRadioButtonManuell; + private JPanel panel4; + private JCheckBox cbEvaluateDuplicates; private JButton btnReloadFilmlist; private JCheckBox cbSign; private JCheckBox cbTrailer; diff --git a/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.jfd b/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.jfd index aac6e69eed..b769179ea9 100644 --- a/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.jfd +++ b/src/main/java/mediathek/gui/dialogEinstellungen/PanelFilmlisteLaden.jfd @@ -1,4 +1,4 @@ -JFDML JFormDesigner: "7.0.7.0.1134" Java: "11.0.15" encoding: "UTF-8" +JFDML JFormDesigner: "8.2.4.0.393" Java: "21.0.4" encoding: "UTF-8" new FormModel { contentType: "form/swing" @@ -6,7 +6,7 @@ new FormModel { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "fillx,insets 5,hidemode 3,gap 5 5" "$columnConstraints": "[label][640,grow,fill]" - "$rowConstraints": "[][][][]" + "$rowConstraints": "[][][][][]" } ) { name: "this" "preferredSize": new java.awt.Dimension( 740, 506 ) @@ -115,6 +115,14 @@ new FormModel { auxiliary() { "JavaCodeGenerator.variableLocal": true } + add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class org.jdesktop.swingx.VerticalLayout ) ) { + name: "panel4" + "border": new javax.swing.border.TitledBorder( "Duplikate (Ă„nderungen erfordern Neuladen der Filmliste)" ) + add( new FormComponent( "javax.swing.JCheckBox" ) { + name: "cbEvaluateDuplicates" + "text": "Erkennung beim Laden der Filmliste einschalten" + } ) + } ) add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { "$layoutConstraints": "insets 5,hidemode 3" "$columnConstraints": "[fill][fill][fill][left]"