1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Don't show other movies files in details UI on import/refresh

This commit is contained in:
Qstick 2020-08-09 21:55:06 -04:00
parent d3697c0339
commit eb299bfb1f
2 changed files with 14 additions and 3 deletions

View File

@ -11,20 +11,25 @@ import MovieFileEditorTableContent from './MovieFileEditorTableContent';
function createMapStateToProps() { function createMapStateToProps() {
return createSelector( return createSelector(
(state, { movieId }) => movieId,
(state) => state.movieFiles, (state) => state.movieFiles,
(state) => state.settings.languages, (state) => state.settings.languages,
(state) => state.settings.qualityProfiles, (state) => state.settings.qualityProfiles,
createMovieSelector(), createMovieSelector(),
( (
movieId,
movieFiles, movieFiles,
languageProfiles, languageProfiles,
qualityProfiles qualityProfiles
) => { ) => {
const languages = languageProfiles.items; const languages = languageProfiles.items;
const qualities = getQualities(qualityProfiles.schema.items); const qualities = getQualities(qualityProfiles.schema.items);
const filesForMovie = movieFiles.items.filter((obj) => {
return obj.movieId === movieId;
});
return { return {
items: movieFiles.items, items: filesForMovie,
isDeleting: movieFiles.isDeleting, isDeleting: movieFiles.isDeleting,
isSaving: movieFiles.isSaving, isSaving: movieFiles.isSaving,
error: null, error: null,

View File

@ -7,13 +7,19 @@ import ExtraFileTableContent from './ExtraFileTableContent';
function createMapStateToProps() { function createMapStateToProps() {
return createSelector( return createSelector(
(state, { movieId }) => movieId,
(state) => state.extraFiles, (state) => state.extraFiles,
createMovieSelector(), createMovieSelector(),
( (
ExtraFiles movieId,
extraFiles
) => { ) => {
const filesForMovie = extraFiles.items.filter((obj) => {
return obj.movieId === movieId;
});
return { return {
items: ExtraFiles.items, items: filesForMovie,
error: null error: null
}; };
} }