1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-09 22:09:47 -04:00

Refactor local datasources (exif, xattr, file)

This commit is contained in:
Reinhard Pointner 2018-08-03 19:29:04 +07:00
parent dbf88c62f3
commit 3239e2c5eb

View File

@ -22,6 +22,7 @@ import net.filebot.format.ExpressionFileFilter;
import net.filebot.format.ExpressionFileFormat; import net.filebot.format.ExpressionFileFormat;
import net.filebot.format.ExpressionFilter; import net.filebot.format.ExpressionFilter;
import net.filebot.format.ExpressionFormat; import net.filebot.format.ExpressionFormat;
import net.filebot.media.LocalDatasource;
import net.filebot.web.Datasource; import net.filebot.web.Datasource;
import net.filebot.web.EpisodeListProvider; import net.filebot.web.EpisodeListProvider;
import net.filebot.web.MovieIdentificationService; import net.filebot.web.MovieIdentificationService;
@ -127,9 +128,8 @@ public class Preset {
return new MusicMatcher((MusicIdentificationService) db); return new MusicMatcher((MusicIdentificationService) db);
} }
// PhotoFileMatcher / XattrFileMatcher / PlainFileMatcher if (db instanceof LocalDatasource) {
if (db instanceof AutoCompleteMatcher) { return new LocalFileMatcher((LocalDatasource) db);
return (AutoCompleteMatcher) db;
} }
throw new IllegalStateException("Illegal datasource: " + db); throw new IllegalStateException("Illegal datasource: " + db);