Make sure that OMDb xattr movie data (with imdbid but without tmdbid) doesn't get accepted when processing files with TMDb.
@see https://www.filebot.net/forums/viewtopic.php?f=6&t=4038#p22634
This commit is contained in:
parent
65d5453797
commit
3ed3f92b48
@ -699,16 +699,15 @@ public class MediaDetection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Movie getLocalizedMovie(MovieIdentificationService service, Movie movie, Locale locale) throws Exception {
|
public static Movie getLocalizedMovie(MovieIdentificationService service, Movie movie, Locale locale) throws Exception {
|
||||||
// retrieve language-specific movie object if possible
|
// retrieve language and service specific movie object
|
||||||
|
if (movie != null) {
|
||||||
try {
|
try {
|
||||||
Movie localized = service.getMovieDescriptor(movie, locale);
|
return service.getMovieDescriptor(movie, locale);
|
||||||
if (localized != null) {
|
|
||||||
return localized;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
debug.log(Level.WARNING, "Failed to retrieve localized movie data", e);
|
debug.log(Level.WARNING, "Failed to retrieve localized movie data", e);
|
||||||
}
|
}
|
||||||
return movie;
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SimilarityMetric getSeriesMatchMetric() {
|
public static SimilarityMetric getSeriesMatchMetric() {
|
||||||
|
@ -183,8 +183,10 @@ class MovieMatcher implements AutoCompleteMatcher {
|
|||||||
Movie movie = grabMovieName(file, options, strict, locale, autodetect, parent);
|
Movie movie = grabMovieName(file, options, strict, locale, autodetect, parent);
|
||||||
|
|
||||||
// make sure to use language-specific movie object if possible
|
// make sure to use language-specific movie object if possible
|
||||||
|
movie = getLocalizedMovie(service, movie, locale);
|
||||||
|
|
||||||
if (movie != null) {
|
if (movie != null) {
|
||||||
movieByFile.put(file, getLocalizedMovie(service, movie, locale));
|
movieByFile.put(file, movie);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -415,7 +417,11 @@ class MovieMatcher implements AutoCompleteMatcher {
|
|||||||
if (input != null && input.length() > 0) {
|
if (input != null && input.length() > 0) {
|
||||||
for (Movie movie : detectMovie(new File(input), service, locale, false)) {
|
for (Movie movie : detectMovie(new File(input), service, locale, false)) {
|
||||||
// make sure to use language-specific movie object if possible
|
// make sure to use language-specific movie object if possible
|
||||||
matches.add(new Match<File, Movie>(null, getLocalizedMovie(service, movie, locale)));
|
movie = getLocalizedMovie(service, movie, locale);
|
||||||
|
|
||||||
|
if (movie != null) {
|
||||||
|
matches.add(new Match<File, Movie>(null, movie));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return matches;
|
return matches;
|
||||||
|
Loading…
Reference in New Issue
Block a user