This commit is contained in:
Reinhard Pointner 2016-03-08 14:43:21 +00:00
parent 3af533fd07
commit 8be83e8759
1 changed files with 7 additions and 10 deletions

View File

@ -1560,19 +1560,16 @@ public class MediaDetection {
}
public static void warmupCachedResources() throws Exception {
// pre-load filter data
// load filter data
MediaDetection.getClutterFileFilter();
MediaDetection.getDiskFolderFilter();
MediaDetection.matchSeriesByDirectMapping(emptyList());
Collection<File> empty = Collections.emptyList();
MediaDetection.matchSeriesByDirectMapping(empty);
// pre-load movie/series index
List<String> dummy = Collections.singletonList("");
MediaDetection.stripReleaseInfo(dummy, true);
MediaDetection.matchSeriesByName(dummy, -1, MediaDetection.getSeriesIndex());
MediaDetection.matchSeriesByName(dummy, -1, MediaDetection.getAnimeIndex());
MediaDetection.matchMovieName(dummy, true, -1);
// load movie/series index
MediaDetection.stripReleaseInfo(singleton(""), true);
MediaDetection.matchSeriesByName(singleton(""), -1, MediaDetection.getSeriesIndex());
MediaDetection.matchSeriesByName(singleton(""), -1, MediaDetection.getAnimeIndex());
MediaDetection.matchMovieName(singleton(""), true, -1);
}
}