diff --git a/source/net/filebot/ui/rename/RenamePanel.java b/source/net/filebot/ui/rename/RenamePanel.java index cd1c7f16..b95261c5 100644 --- a/source/net/filebot/ui/rename/RenamePanel.java +++ b/source/net/filebot/ui/rename/RenamePanel.java @@ -81,6 +81,9 @@ import ca.odell.glazedlists.swing.EventSelectionModel; public class RenamePanel extends JComponent { + private static final String MATCH_MODE_OPPORTUNISTIC = "Opportunistic"; + private static final String MATCH_MODE_STRICT = "Strict"; + protected final RenameModel renameModel = new RenameModel(); protected final RenameList namesList = new RenameList(renameModel.names()); @@ -97,7 +100,7 @@ public class RenamePanel extends JComponent { private static final PreferencesEntry persistentFileFormat = Settings.forPackage(RenamePanel.class).entry("rename.format.file"); private static final PreferencesEntry persistentLastFormatState = Settings.forPackage(RenamePanel.class).entry("rename.last.format.state"); - private static final PreferencesEntry persistentPreferredMatchMode = Settings.forPackage(RenamePanel.class).entry("rename.match.mode").defaultValue("Opportunistic"); + private static final PreferencesEntry persistentPreferredMatchMode = Settings.forPackage(RenamePanel.class).entry("rename.match.mode").defaultValue(MATCH_MODE_OPPORTUNISTIC); private static final PreferencesEntry persistentPreferredLanguage = Settings.forPackage(RenamePanel.class).entry("rename.language").defaultValue("en"); private static final PreferencesEntry persistentPreferredEpisodeOrder = Settings.forPackage(RenamePanel.class).entry("rename.episode.order").defaultValue("Airdate"); @@ -358,7 +361,7 @@ public class RenamePanel extends JComponent { } private boolean isMatchModeStrict() { - return "strict".equalsIgnoreCase(persistentPreferredMatchMode.getValue()); + return MATCH_MODE_STRICT.equalsIgnoreCase(persistentPreferredMatchMode.getValue()); } protected ActionPopup createFetchPopup() { @@ -400,7 +403,7 @@ public class RenamePanel extends JComponent { @Override public void actionPerformed(ActionEvent evt) { - String[] modes = new String[] { "Opportunistic", "Strict" }; + String[] modes = new String[] { MATCH_MODE_OPPORTUNISTIC, MATCH_MODE_STRICT }; JComboBox modeCombo = new JComboBox(modes); List languages = new ArrayList();