|
|
@ -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,
|
|
|
|