From 3239e2c5ebc5f31990ed522cf85cb8de0c226516 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 3 Aug 2018 19:29:04 +0700 Subject: [PATCH] Refactor local datasources (exif, xattr, file) --- source/net/filebot/ui/rename/Preset.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/ui/rename/Preset.java b/source/net/filebot/ui/rename/Preset.java index 0ee28497..a38d6a94 100644 --- a/source/net/filebot/ui/rename/Preset.java +++ b/source/net/filebot/ui/rename/Preset.java @@ -22,6 +22,7 @@ import net.filebot.format.ExpressionFileFilter; import net.filebot.format.ExpressionFileFormat; import net.filebot.format.ExpressionFilter; import net.filebot.format.ExpressionFormat; +import net.filebot.media.LocalDatasource; import net.filebot.web.Datasource; import net.filebot.web.EpisodeListProvider; import net.filebot.web.MovieIdentificationService; @@ -127,9 +128,8 @@ public class Preset { return new MusicMatcher((MusicIdentificationService) db); } - // PhotoFileMatcher / XattrFileMatcher / PlainFileMatcher - if (db instanceof AutoCompleteMatcher) { - return (AutoCompleteMatcher) db; + if (db instanceof LocalDatasource) { + return new LocalFileMatcher((LocalDatasource) db); } throw new IllegalStateException("Illegal datasource: " + db);