mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-25 09:18:51 -05:00
* improve series detection, and make sure to not scrub things too aggressively as not to loose information
* skip search if all files are tagged already
This commit is contained in:
parent
db86aa5153
commit
9aa97268c5
@ -305,6 +305,11 @@ public class MediaDetection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// completely trust xattr metadata if all files are tagged
|
||||||
|
if (names.size() == files.size()) {
|
||||||
|
return getUniqueQuerySet(names);
|
||||||
|
}
|
||||||
|
|
||||||
// try to detect series name via nfo files
|
// try to detect series name via nfo files
|
||||||
try {
|
try {
|
||||||
for (SearchResult it : lookupSeriesNameByInfoFile(files, locale)) {
|
for (SearchResult it : lookupSeriesNameByInfoFile(files, locale)) {
|
||||||
@ -338,7 +343,7 @@ public class MediaDetection {
|
|||||||
fn = sn;
|
fn = sn;
|
||||||
}
|
}
|
||||||
|
|
||||||
(i == 0 ? filenames : folders).add(normalizeBrackets(fn));
|
(i == 0 ? filenames : folders).add(fn); // keep series name unique with year
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1364,7 +1369,7 @@ public class MediaDetection {
|
|||||||
} else if (model instanceof Movie) {
|
} else if (model instanceof Movie) {
|
||||||
Movie movie = (Movie) model;
|
Movie movie = (Movie) model;
|
||||||
if (movie.getYear() > 0 && movie.getTmdbId() > 0) {
|
if (movie.getYear() > 0 && movie.getTmdbId() > 0) {
|
||||||
Date releaseDate = WebServices.TMDb.getMovieInfo(movie, Locale.ENGLISH, false).getReleased();
|
Date releaseDate = WebServices.TheMovieDB.getMovieInfo(movie, Locale.ENGLISH, false).getReleased();
|
||||||
xattr.setCreationDate(releaseDate.getTimeStamp());
|
xattr.setCreationDate(releaseDate.getTimeStamp());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,13 +192,13 @@ public class SeriesNameMatcher {
|
|||||||
int seasonEpisodePosition = seasonEpisodeMatcher.find(name, 0);
|
int seasonEpisodePosition = seasonEpisodeMatcher.find(name, 0);
|
||||||
if (seasonEpisodePosition > 0) {
|
if (seasonEpisodePosition > 0) {
|
||||||
// series name ends at the first season episode pattern
|
// series name ends at the first season episode pattern
|
||||||
return normalize(name.substring(0, seasonEpisodePosition));
|
return name.substring(0, seasonEpisodePosition).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
int datePosition = dateMatcher.find(name, 0);
|
int datePosition = dateMatcher.find(name, 0);
|
||||||
if (datePosition > 0) {
|
if (datePosition > 0) {
|
||||||
// series name ends at the first season episode pattern
|
// series name ends at the first season episode pattern
|
||||||
return normalize(name.substring(0, datePosition));
|
return name.substring(0, datePosition).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user