|
|
|
@ -37,8 +37,6 @@ import * as keyCodes from 'Utilities/Constants/keyCodes';
|
|
|
|
|
import formatRuntime from 'Utilities/Date/formatRuntime';
|
|
|
|
|
import formatBytes from 'Utilities/Number/formatBytes';
|
|
|
|
|
import translate from 'Utilities/String/translate';
|
|
|
|
|
import selectAll from 'Utilities/Table/selectAll';
|
|
|
|
|
import toggleSelected from 'Utilities/Table/toggleSelected';
|
|
|
|
|
import MovieCollectionLabelConnector from './../MovieCollectionLabelConnector';
|
|
|
|
|
import MovieCastPostersConnector from './Credits/Cast/MovieCastPostersConnector';
|
|
|
|
|
import MovieCrewPostersConnector from './Credits/Crew/MovieCrewPostersConnector';
|
|
|
|
@ -56,14 +54,6 @@ function getFanartUrl(images) {
|
|
|
|
|
return _.find(images, { coverType: 'fanart' })?.url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getExpandedState(newState) {
|
|
|
|
|
return {
|
|
|
|
|
allExpanded: newState.allSelected,
|
|
|
|
|
allCollapsed: newState.allUnselected,
|
|
|
|
|
expandedState: newState.selectedState
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MovieDetails extends Component {
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
@ -79,9 +69,6 @@ class MovieDetails extends Component {
|
|
|
|
|
isInteractiveImportModalOpen: false,
|
|
|
|
|
isInteractiveSearchModalOpen: false,
|
|
|
|
|
isMovieHistoryModalOpen: false,
|
|
|
|
|
allExpanded: false,
|
|
|
|
|
allCollapsed: false,
|
|
|
|
|
expandedState: {},
|
|
|
|
|
overviewHeight: 0,
|
|
|
|
|
titleWidth: 0
|
|
|
|
|
};
|
|
|
|
@ -114,10 +101,6 @@ class MovieDetails extends Component {
|
|
|
|
|
this.setState({ isOrganizeModalOpen: false });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onManageEpisodesPress = () => {
|
|
|
|
|
this.setState({ isManageEpisodesOpen: true });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onInteractiveImportPress = () => {
|
|
|
|
|
this.setState({ isInteractiveImportModalOpen: true });
|
|
|
|
|
};
|
|
|
|
@ -161,29 +144,6 @@ class MovieDetails extends Component {
|
|
|
|
|
this.setState({ isMovieHistoryModalOpen: false });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onExpandAllPress = () => {
|
|
|
|
|
const {
|
|
|
|
|
allExpanded,
|
|
|
|
|
expandedState
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
this.setState(getExpandedState(selectAll(expandedState, !allExpanded)));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onExpandPress = (seasonNumber, isExpanded) => {
|
|
|
|
|
this.setState((state) => {
|
|
|
|
|
const convertedState = {
|
|
|
|
|
allSelected: state.allExpanded,
|
|
|
|
|
allUnselected: state.allCollapsed,
|
|
|
|
|
selectedState: state.expandedState
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const newState = toggleSelected(convertedState, [], seasonNumber, isExpanded, false);
|
|
|
|
|
|
|
|
|
|
return getExpandedState(newState);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onMeasure = ({ height }) => {
|
|
|
|
|
this.setState({ overviewHeight: height });
|
|
|
|
|
};
|
|
|
|
@ -255,10 +215,6 @@ class MovieDetails extends Component {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onTabSelect = (index, lastIndex) => {
|
|
|
|
|
this.setState({ selectedTabIndex: index });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Render
|
|
|
|
|
|
|
|
|
|