1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

Fixed: Show year and fix sorting for collection movies

This commit is contained in:
Bogdan
2023-10-08 01:41:15 +03:00
parent a2d505c795
commit f5692d6cf1
6 changed files with 29 additions and 21 deletions

View File

@@ -1,17 +0,0 @@
import { createSelector } from 'reselect';
function createCollectionSelector() {
return createSelector(
(state, { collectionId }) => collectionId,
(state) => state.movieCollections.itemMap,
(state) => state.movieCollections.items,
(collectionId, itemMap, allCollections) => {
if (allCollections && itemMap && collectionId in itemMap) {
return allCollections[itemMap[collectionId]];
}
return undefined;
}
);
}
export default createCollectionSelector;

View File

@@ -0,0 +1,17 @@
import { createSelector } from 'reselect';
import AppState from 'App/State/AppState';
function createCollectionSelector() {
return createSelector(
(_: AppState, { collectionId }: { collectionId: number }) => collectionId,
(state: AppState) => state.movieCollections.itemMap,
(state: AppState) => state.movieCollections.items,
(collectionId, itemMap, allCollections) => {
return allCollections && itemMap && collectionId in itemMap
? allCollections[itemMap[collectionId]]
: undefined;
}
);
}
export default createCollectionSelector;