From f0252c42cd82e8b0400daa0aa5bd9e35019fc89f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 6 Apr 2016 18:56:36 +0000 Subject: [PATCH] Refactor --- .../ui/rename/{MovieHashMatcher.java => MovieMatcher.java} | 6 +++--- .../{AudioFingerprintMatcher.java => MusicMatcher.java} | 4 ++-- source/net/filebot/ui/rename/Preset.java | 4 ++-- source/net/filebot/ui/rename/RenamePanel.java | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) rename source/net/filebot/ui/rename/{MovieHashMatcher.java => MovieMatcher.java} (98%) rename source/net/filebot/ui/rename/{AudioFingerprintMatcher.java => MusicMatcher.java} (89%) diff --git a/source/net/filebot/ui/rename/MovieHashMatcher.java b/source/net/filebot/ui/rename/MovieMatcher.java similarity index 98% rename from source/net/filebot/ui/rename/MovieHashMatcher.java rename to source/net/filebot/ui/rename/MovieMatcher.java index 6d11015d..2ccc36b7 100644 --- a/source/net/filebot/ui/rename/MovieHashMatcher.java +++ b/source/net/filebot/ui/rename/MovieMatcher.java @@ -51,11 +51,11 @@ import net.filebot.web.MovieIdentificationService; import net.filebot.web.MoviePart; import net.filebot.web.SortOrder; -class MovieHashMatcher implements AutoCompleteMatcher { +class MovieMatcher implements AutoCompleteMatcher { private final MovieIdentificationService service; - public MovieHashMatcher(MovieIdentificationService service) { + public MovieMatcher(MovieIdentificationService service) { this.service = service; } @@ -394,7 +394,7 @@ class MovieHashMatcher implements AutoCompleteMatcher { selectDialog.getCancelAction().putValue(Action.NAME, "Ignore"); // restore original dialog size - Settings prefs = Settings.forPackage(MovieHashMatcher.class); + Settings prefs = Settings.forPackage(MovieMatcher.class); int w = Integer.parseInt(prefs.get("dialog.select.w", "280")); int h = Integer.parseInt(prefs.get("dialog.select.h", "300")); selectDialog.setPreferredSize(new Dimension(w, h)); diff --git a/source/net/filebot/ui/rename/AudioFingerprintMatcher.java b/source/net/filebot/ui/rename/MusicMatcher.java similarity index 89% rename from source/net/filebot/ui/rename/AudioFingerprintMatcher.java rename to source/net/filebot/ui/rename/MusicMatcher.java index 0f4af82c..c551c2a4 100644 --- a/source/net/filebot/ui/rename/AudioFingerprintMatcher.java +++ b/source/net/filebot/ui/rename/MusicMatcher.java @@ -16,11 +16,11 @@ import net.filebot.web.AudioTrack; import net.filebot.web.MusicIdentificationService; import net.filebot.web.SortOrder; -class AudioFingerprintMatcher implements AutoCompleteMatcher { +class MusicMatcher implements AutoCompleteMatcher { private MusicIdentificationService[] services; - public AudioFingerprintMatcher(MusicIdentificationService... services) { + public MusicMatcher(MusicIdentificationService... services) { this.services = services; } diff --git a/source/net/filebot/ui/rename/Preset.java b/source/net/filebot/ui/rename/Preset.java index 4ae08b80..9b67e062 100644 --- a/source/net/filebot/ui/rename/Preset.java +++ b/source/net/filebot/ui/rename/Preset.java @@ -94,7 +94,7 @@ public class Preset { public AutoCompleteMatcher getAutoCompleteMatcher() { MovieIdentificationService mdb = WebServices.getMovieIdentificationService(database); if (mdb != null) { - return new MovieHashMatcher(mdb); + return new MovieMatcher(mdb); } EpisodeListProvider sdb = WebServices.getEpisodeListProvider(database); @@ -104,7 +104,7 @@ public class Preset { MusicIdentificationService adb = WebServices.getMusicIdentificationService(database); if (adb != null) { - return new AudioFingerprintMatcher(adb); + return new MusicMatcher(adb); } if (PlainFileMatcher.getInstance().getIdentifier().equals(database)) { diff --git a/source/net/filebot/ui/rename/RenamePanel.java b/source/net/filebot/ui/rename/RenamePanel.java index 37feeb8c..d610d380 100644 --- a/source/net/filebot/ui/rename/RenamePanel.java +++ b/source/net/filebot/ui/rename/RenamePanel.java @@ -440,13 +440,13 @@ public class RenamePanel extends JComponent { // create action for movie name completion for (MovieIdentificationService it : WebServices.getMovieIdentificationServices()) { - actionPopup.add(new AutoCompleteAction(it.getName(), it.getIcon(), new MovieHashMatcher(it))); + actionPopup.add(new AutoCompleteAction(it.getName(), it.getIcon(), new MovieMatcher(it))); } actionPopup.addSeparator(); actionPopup.addDescription(new JLabel("Music Mode:")); for (MusicIdentificationService it : WebServices.getMusicIdentificationServices()) { - actionPopup.add(new AutoCompleteAction(it.getName(), it.getIcon(), new AudioFingerprintMatcher(it))); + actionPopup.add(new AutoCompleteAction(it.getName(), it.getIcon(), new MusicMatcher(it))); } actionPopup.addSeparator();