|
|
@ -78,6 +78,12 @@ export const defaultState = {
|
|
|
|
isVisible: true,
|
|
|
|
isVisible: true,
|
|
|
|
isModifiable: false
|
|
|
|
isModifiable: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: 'collection',
|
|
|
|
|
|
|
|
label: 'Collection',
|
|
|
|
|
|
|
|
isSortable: true,
|
|
|
|
|
|
|
|
isVisible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'studio',
|
|
|
|
name: 'studio',
|
|
|
|
label: 'Studio',
|
|
|
|
label: 'Studio',
|
|
|
@ -173,6 +179,12 @@ export const defaultState = {
|
|
|
|
return studio ? studio.toLowerCase() : '';
|
|
|
|
return studio ? studio.toLowerCase() : '';
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collection: function(item) {
|
|
|
|
|
|
|
|
const { collection ={} } = item;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return collection.name;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
ratings: function(item) {
|
|
|
|
ratings: function(item) {
|
|
|
|
const { ratings = {} } = item;
|
|
|
|
const { ratings = {} } = item;
|
|
|
|
|
|
|
|
|
|
|
@ -215,6 +227,25 @@ export const defaultState = {
|
|
|
|
return tagList.sort(sortByName);
|
|
|
|
return tagList.sort(sortByName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: 'collection',
|
|
|
|
|
|
|
|
label: 'Collection',
|
|
|
|
|
|
|
|
type: filterBuilderTypes.ARRAY,
|
|
|
|
|
|
|
|
optionsSelector: function(items) {
|
|
|
|
|
|
|
|
const collectionList = items.reduce((acc, movie) => {
|
|
|
|
|
|
|
|
if (movie.collection) {
|
|
|
|
|
|
|
|
acc.push({
|
|
|
|
|
|
|
|
id: movie.collection.name,
|
|
|
|
|
|
|
|
name: movie.collection.name
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return acc;
|
|
|
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return collectionList.sort(sortByName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'qualityProfileId',
|
|
|
|
name: 'qualityProfileId',
|
|
|
|
label: 'Quality Profile',
|
|
|
|
label: 'Quality Profile',
|
|
|
@ -255,7 +286,7 @@ export const defaultState = {
|
|
|
|
label: 'Genres',
|
|
|
|
label: 'Genres',
|
|
|
|
type: filterBuilderTypes.ARRAY,
|
|
|
|
type: filterBuilderTypes.ARRAY,
|
|
|
|
optionsSelector: function(items) {
|
|
|
|
optionsSelector: function(items) {
|
|
|
|
const tagList = items.reduce((acc, movie) => {
|
|
|
|
const genreList = items.reduce((acc, movie) => {
|
|
|
|
movie.genres.forEach((genre) => {
|
|
|
|
movie.genres.forEach((genre) => {
|
|
|
|
acc.push({
|
|
|
|
acc.push({
|
|
|
|
id: genre,
|
|
|
|
id: genre,
|
|
|
@ -266,7 +297,7 @@ export const defaultState = {
|
|
|
|
return acc;
|
|
|
|
return acc;
|
|
|
|
}, []);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
return tagList.sort(sortByName);
|
|
|
|
return genreList.sort(sortByName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|