Improved auto-detection for E01 style episodes
This commit is contained in:
parent
ce4293860f
commit
e8489e49ac
@ -75,7 +75,7 @@ public class AutoDetection {
|
||||
private static final Pattern SERIES_PATTERN = Pattern.compile("TV.Shows|TV.Series|Season.[0-9]+", CASE_INSENSITIVE);
|
||||
private static final Pattern ANIME_PATTERN = Pattern.compile("Anime", CASE_INSENSITIVE);
|
||||
|
||||
private static final Pattern EPISODE_PATTERN = Pattern.compile("E\\d{2,3}|EP\\d{1,3}", CASE_INSENSITIVE);
|
||||
private static final Pattern EPISODE_PATTERN = Pattern.compile("E[P]?\\d{1,3}", CASE_INSENSITIVE);
|
||||
private static final Pattern SERIES_EPISODE_PATTERN = Pattern.compile("^tv[sp]\\p{Punct}", CASE_INSENSITIVE);
|
||||
private static final Pattern ANIME_EPISODE_PATTERN = Pattern.compile("^\\[[^\\]]+Subs\\]", CASE_INSENSITIVE);
|
||||
|
||||
@ -96,10 +96,6 @@ public class AutoDetection {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (find(f.getName(), EPISODE_PATTERN) && !isAnime(f)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Object metaInfo = xattr.getMetaInfo(f);
|
||||
return metaInfo instanceof Episode && !AniDB.getIdentifier().equals(((Episode) metaInfo).getSeriesInfo().getDatabase());
|
||||
}
|
||||
@ -170,6 +166,10 @@ public class AutoDetection {
|
||||
if (isAnime(f))
|
||||
return group.anime(getSeriesMatches(f, true));
|
||||
|
||||
// ignore movie matches if filename looks like an episode
|
||||
if (find(f.getName(), EPISODE_PATTERN))
|
||||
return group.series(getSeriesMatches(f, false));
|
||||
|
||||
// Movie VS Episode
|
||||
List<Movie> m = getMovieMatches(f, false);
|
||||
List<String> s = getSeriesMatches(f, false);
|
||||
|
Loading…
Reference in New Issue
Block a user