Group by Movie (rather than MoviePart)

https://www.filebot.net/forums/viewtopic.php?f=5&t=10716
This commit is contained in:
Reinhard Pointner 2019-04-23 19:50:58 +07:00
parent b449bcec3c
commit 13cfca422c
2 changed files with 9 additions and 1 deletions

View File

@ -439,7 +439,7 @@ public class AutoDetection {
}
public Group movie(List<Movie> movies) {
put(Type.Movie, movies == null || movies.isEmpty() ? null : movies.get(0));
put(Type.Movie, movies == null || movies.isEmpty() ? null : new Movie(movies.get(0))); // group by Movie (rather than MoviePart)
return this;
}

View File

@ -38,6 +38,14 @@ public class Movie extends SearchResult {
this.language = locale == null ? null : locale.getLanguage();
}
public Movie(Movie movie) {
super(movie.id, movie.name, movie.aliasNames);
this.year = movie.year;
this.imdbId = movie.imdbId;
this.tmdbId = movie.tmdbId;
this.language = movie.language;
}
public int getYear() {
return year;
}