mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 00:08:51 -05:00
Use Locale.US as default locale for TheMovieDB requests (because US is likely cached due to language preferences, while ENGLISH may not be)
This commit is contained in:
parent
7fcbc4d614
commit
38d170179d
@ -143,7 +143,7 @@ public class MediaDetection {
|
||||
// check for valid imdb id patterns
|
||||
return grepImdbId(file.getPath()).stream().map(Movie::new).filter(m -> {
|
||||
try {
|
||||
return strict ? WebServices.TheMovieDB.getMovieDescriptor(m, Locale.ENGLISH).getId() > 0 : true;
|
||||
return strict ? WebServices.TheMovieDB.getMovieDescriptor(m, Locale.US).getId() > 0 : true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class XattrMetaInfo {
|
||||
} else if (object instanceof Movie) {
|
||||
Movie movie = (Movie) object;
|
||||
if (movie.getYear() > 0 && movie.getTmdbId() > 0) {
|
||||
SimpleDate releaseDate = WebServices.TheMovieDB.getMovieInfo(movie, Locale.ENGLISH, false).getReleased();
|
||||
SimpleDate releaseDate = WebServices.TheMovieDB.getMovieInfo(movie, Locale.US, false).getReleased();
|
||||
if (releaseDate != null) {
|
||||
return releaseDate.getTimeStamp();
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ public class SubtitleUploadDialog extends JDialog {
|
||||
Collection<Movie> identity = MediaDetection.detectMovie(mapping.getVideo(), database, Locale.ENGLISH, true);
|
||||
for (Movie it : identity) {
|
||||
if (it.getImdbId() <= 0 && it.getTmdbId() > 0) {
|
||||
it = WebServices.TheMovieDB.getMovieDescriptor(it, Locale.ENGLISH);
|
||||
it = WebServices.TheMovieDB.getMovieDescriptor(it, Locale.US);
|
||||
}
|
||||
if (it != null && it.getImdbId() > 0) {
|
||||
mapping.setIdentity(it);
|
||||
|
Loading…
Reference in New Issue
Block a user