mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Calendar Missing Search Not Functional, Other Tweaks
This commit is contained in:
@@ -25,7 +25,7 @@ function createMissingMovieIdsSelector() {
|
|||||||
moment(inCinemas).isAfter(start) &&
|
moment(inCinemas).isAfter(start) &&
|
||||||
moment(inCinemas).isBefore(end) &&
|
moment(inCinemas).isBefore(end) &&
|
||||||
isBefore(movie.inCinemas) &&
|
isBefore(movie.inCinemas) &&
|
||||||
!queueDetails.some((details) => !!details.movie && details.movie.id === movie.id)
|
!queueDetails.some((details) => details.movieId === movie.id)
|
||||||
) {
|
) {
|
||||||
acc.push(movie.id);
|
acc.push(movie.id);
|
||||||
}
|
}
|
||||||
|
@@ -11,23 +11,35 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
composes: link from '~Components/Link/Link.css';
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
color: $defaultColor;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $defaultColor;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.info,
|
.info,
|
||||||
.episodeInfo {
|
.movieInfo {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.episodeInfo {
|
.movieInfo {
|
||||||
color: $calendarTextDim;
|
color: $calendarTextDim;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seriesTitle,
|
.movieTitle,
|
||||||
.episodeTitle {
|
.genres {
|
||||||
@add-mixin truncate;
|
@add-mixin truncate;
|
||||||
flex: 1 0 1px;
|
flex: 1 0 1px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.seriesTitle {
|
.movieTitle {
|
||||||
color: #3a3f51;
|
color: #3a3f51;
|
||||||
font-size: $defaultFontSize;
|
font-size: $defaultFontSize;
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,6 @@ import getStatusStyle from 'Calendar/getStatusStyle';
|
|||||||
import Icon from 'Components/Icon';
|
import Icon from 'Components/Icon';
|
||||||
import Link from 'Components/Link/Link';
|
import Link from 'Components/Link/Link';
|
||||||
import CalendarEventQueueDetails from './CalendarEventQueueDetails';
|
import CalendarEventQueueDetails from './CalendarEventQueueDetails';
|
||||||
import MovieTitleLink from 'Movie/MovieTitleLink';
|
|
||||||
import styles from './CalendarEvent.css';
|
import styles from './CalendarEvent.css';
|
||||||
|
|
||||||
class CalendarEvent extends Component {
|
class CalendarEvent extends Component {
|
||||||
@@ -19,25 +18,10 @@ class CalendarEvent extends Component {
|
|||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
isDetailsModalOpen: false
|
// isDetailsModalOpen: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Listeners
|
|
||||||
|
|
||||||
onPress = () => {
|
|
||||||
this.setState({ isDetailsModalOpen: true }, () => {
|
|
||||||
this.props.onEventModalOpenToggle(true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onDetailsModalClose = () => {
|
|
||||||
this.setState({ isDetailsModalOpen: false }, () => {
|
|
||||||
this.props.onEventModalOpenToggle(false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Render
|
// Render
|
||||||
|
|
||||||
@@ -47,10 +31,12 @@ class CalendarEvent extends Component {
|
|||||||
inCinemas,
|
inCinemas,
|
||||||
title,
|
title,
|
||||||
titleSlug,
|
titleSlug,
|
||||||
|
genres,
|
||||||
monitored,
|
monitored,
|
||||||
hasFile,
|
hasFile,
|
||||||
grabbed,
|
grabbed,
|
||||||
queueItem,
|
queueItem,
|
||||||
|
showMovieInformation,
|
||||||
showCutoffUnmetIcon,
|
showCutoffUnmetIcon,
|
||||||
colorImpairedMode
|
colorImpairedMode
|
||||||
} = this.props;
|
} = this.props;
|
||||||
@@ -59,24 +45,24 @@ class CalendarEvent extends Component {
|
|||||||
const isDownloading = !!(queueItem || grabbed);
|
const isDownloading = !!(queueItem || grabbed);
|
||||||
const isMonitored = monitored;
|
const isMonitored = monitored;
|
||||||
const statusStyle = getStatusStyle(hasFile, isDownloading, startTime, isMonitored);
|
const statusStyle = getStatusStyle(hasFile, isDownloading, startTime, isMonitored);
|
||||||
|
const joinedGenres = genres.slice(0, 2).join(', ');
|
||||||
|
const link = `/movie/${titleSlug}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Link
|
<Link
|
||||||
className={classNames(
|
className={classNames(
|
||||||
styles.event,
|
styles.event,
|
||||||
|
styles.link,
|
||||||
styles[statusStyle],
|
styles[statusStyle],
|
||||||
colorImpairedMode && 'colorImpaired'
|
colorImpairedMode && 'colorImpaired'
|
||||||
)}
|
)}
|
||||||
component="div"
|
// component="div"
|
||||||
onPress={this.onPress}
|
to={link}
|
||||||
>
|
>
|
||||||
<div className={styles.info}>
|
<div className={styles.info}>
|
||||||
<div className={styles.seriesTitle}>
|
<div className={styles.movieTitle}>
|
||||||
<MovieTitleLink
|
{title}
|
||||||
titleSlug={titleSlug}
|
|
||||||
title={title}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -109,6 +95,15 @@ class CalendarEvent extends Component {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{
|
||||||
|
showMovieInformation &&
|
||||||
|
<div className={styles.movieInfo}>
|
||||||
|
<div className={styles.genres}>
|
||||||
|
{joinedGenres}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -118,6 +113,7 @@ class CalendarEvent extends Component {
|
|||||||
|
|
||||||
CalendarEvent.propTypes = {
|
CalendarEvent.propTypes = {
|
||||||
id: PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
|
genres: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||||
movieFile: PropTypes.object,
|
movieFile: PropTypes.object,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
titleSlug: PropTypes.string.isRequired,
|
titleSlug: PropTypes.string.isRequired,
|
||||||
@@ -126,10 +122,15 @@ CalendarEvent.propTypes = {
|
|||||||
hasFile: PropTypes.bool.isRequired,
|
hasFile: PropTypes.bool.isRequired,
|
||||||
grabbed: PropTypes.bool,
|
grabbed: PropTypes.bool,
|
||||||
queueItem: PropTypes.object,
|
queueItem: PropTypes.object,
|
||||||
|
showMovieInformation: PropTypes.bool.isRequired,
|
||||||
showCutoffUnmetIcon: PropTypes.bool.isRequired,
|
showCutoffUnmetIcon: PropTypes.bool.isRequired,
|
||||||
timeFormat: PropTypes.string.isRequired,
|
timeFormat: PropTypes.string.isRequired,
|
||||||
colorImpairedMode: PropTypes.bool.isRequired,
|
colorImpairedMode: PropTypes.bool.isRequired
|
||||||
onEventModalOpenToggle: PropTypes.func.isRequired
|
// onEventModalOpenToggle: PropTypes.func.isRequired
|
||||||
|
};
|
||||||
|
|
||||||
|
CalendarEvent.defaultProps = {
|
||||||
|
genres: []
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CalendarEvent;
|
export default CalendarEvent;
|
||||||
|
@@ -25,7 +25,7 @@ function CalendarEventQueueDetails(props) {
|
|||||||
status={status}
|
status={status}
|
||||||
errorMessage={errorMessage}
|
errorMessage={errorMessage}
|
||||||
progressBar={
|
progressBar={
|
||||||
<div title={`Episode is downloading - ${progress.toFixed(1)}% ${title}`}>
|
<div title={`Movie is downloading - ${progress.toFixed(1)}% ${title}`}>
|
||||||
<CircularProgressBar
|
<CircularProgressBar
|
||||||
progress={progress}
|
progress={progress}
|
||||||
size={20}
|
size={20}
|
||||||
|
@@ -92,9 +92,7 @@ class CalendarOptionsModalContent extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
collapseMultipleEpisodes,
|
collapseMultipleEpisodes,
|
||||||
showEpisodeInformation,
|
showMovieInformation,
|
||||||
showFinaleIcon,
|
|
||||||
showSpecialIcon,
|
|
||||||
showCutoffUnmetIcon,
|
showCutoffUnmetIcon,
|
||||||
onModalClose
|
onModalClose
|
||||||
} = this.props;
|
} = this.props;
|
||||||
@@ -128,37 +126,13 @@ class CalendarOptionsModalContent extends Component {
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>Show Episode Information</FormLabel>
|
<FormLabel>Show Movie Information</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="showEpisodeInformation"
|
name="showMovieInformation"
|
||||||
value={showEpisodeInformation}
|
value={showMovieInformation}
|
||||||
helpText="Show episode title and number"
|
helpText="Show movie genres and certification"
|
||||||
onChange={this.onOptionInputChange}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
|
|
||||||
<FormGroup>
|
|
||||||
<FormLabel>Icon for Finales</FormLabel>
|
|
||||||
|
|
||||||
<FormInputGroup
|
|
||||||
type={inputTypes.CHECK}
|
|
||||||
name="showFinaleIcon"
|
|
||||||
value={showFinaleIcon}
|
|
||||||
helpText="Show icon for series/season finales based on available episode information"
|
|
||||||
onChange={this.onOptionInputChange}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
|
|
||||||
<FormGroup>
|
|
||||||
<FormLabel>Icon for Specials</FormLabel>
|
|
||||||
|
|
||||||
<FormInputGroup
|
|
||||||
type={inputTypes.CHECK}
|
|
||||||
name="showSpecialIcon"
|
|
||||||
value={showSpecialIcon}
|
|
||||||
helpText="Show icon for special episodes (season 0)"
|
|
||||||
onChange={this.onOptionInputChange}
|
onChange={this.onOptionInputChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
@@ -242,7 +216,7 @@ class CalendarOptionsModalContent extends Component {
|
|||||||
|
|
||||||
CalendarOptionsModalContent.propTypes = {
|
CalendarOptionsModalContent.propTypes = {
|
||||||
collapseMultipleEpisodes: PropTypes.bool.isRequired,
|
collapseMultipleEpisodes: PropTypes.bool.isRequired,
|
||||||
showEpisodeInformation: PropTypes.bool.isRequired,
|
showMovieInformation: PropTypes.bool.isRequired,
|
||||||
showFinaleIcon: PropTypes.bool.isRequired,
|
showFinaleIcon: PropTypes.bool.isRequired,
|
||||||
showSpecialIcon: PropTypes.bool.isRequired,
|
showSpecialIcon: PropTypes.bool.isRequired,
|
||||||
showCutoffUnmetIcon: PropTypes.bool.isRequired,
|
showCutoffUnmetIcon: PropTypes.bool.isRequired,
|
||||||
|
@@ -39,9 +39,7 @@ export const defaultState = {
|
|||||||
|
|
||||||
options: {
|
options: {
|
||||||
collapseMultipleEpisodes: false,
|
collapseMultipleEpisodes: false,
|
||||||
showEpisodeInformation: true,
|
showMovieInformation: true,
|
||||||
showFinaleIcon: false,
|
|
||||||
showSpecialIcon: false,
|
|
||||||
showCutoffUnmetIcon: false
|
showCutoffUnmetIcon: false
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -346,11 +344,11 @@ export const actionHandlers = handleThunks({
|
|||||||
},
|
},
|
||||||
|
|
||||||
[SEARCH_MISSING]: function(getState, payload, dispatch) {
|
[SEARCH_MISSING]: function(getState, payload, dispatch) {
|
||||||
const { episodeIds } = payload;
|
const { movieIds } = payload;
|
||||||
|
|
||||||
const commandPayload = {
|
const commandPayload = {
|
||||||
name: commandNames.MOVIE_SEARCH,
|
name: commandNames.MOVIE_SEARCH,
|
||||||
episodeIds
|
movieIds
|
||||||
};
|
};
|
||||||
|
|
||||||
executeCommandHelper(commandPayload, dispatch).then((data) => {
|
executeCommandHelper(commandPayload, dispatch).then((data) => {
|
||||||
|
Reference in New Issue
Block a user