mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-05 13:21:25 -05:00
Fixed: Using all movie genres for collection filters
This commit is contained in:
@@ -91,12 +91,8 @@ export const defaultState = {
|
||||
genres: function(item, filterValue, type) {
|
||||
const predicate = filterTypePredicates[type];
|
||||
|
||||
let allGenres = [];
|
||||
item.movies.forEach((movie) => {
|
||||
allGenres = allGenres.concat(movie.genres);
|
||||
});
|
||||
|
||||
const genres = Array.from(new Set(allGenres)).slice(0, 3);
|
||||
const allGenres = item.movies.flatMap(({ genres }) => genres);
|
||||
const genres = Array.from(new Set(allGenres));
|
||||
|
||||
return predicate(genres, filterValue);
|
||||
},
|
||||
@@ -138,12 +134,8 @@ export const defaultState = {
|
||||
type: filterBuilderTypes.ARRAY,
|
||||
optionsSelector: function(items) {
|
||||
const genreList = items.reduce((acc, collection) => {
|
||||
let collectionGenres = [];
|
||||
collection.movies.forEach((movie) => {
|
||||
collectionGenres = collectionGenres.concat(movie.genres);
|
||||
});
|
||||
|
||||
const genres = Array.from(new Set(collectionGenres)).slice(0, 3);
|
||||
const collectionGenres = collection.movies.flatMap(({ genres }) => genres);
|
||||
const genres = Array.from(new Set(collectionGenres));
|
||||
|
||||
genres.forEach((genre) => {
|
||||
acc.push({
|
||||
|
||||
Reference in New Issue
Block a user