mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Show Physical Releases on Calendar
This commit is contained in:
parent
bbd065940e
commit
6d87b5dfec
@ -40,6 +40,7 @@ function CalendarDay(props) {
|
|||||||
<CalendarEventConnector
|
<CalendarEventConnector
|
||||||
key={event.id}
|
key={event.id}
|
||||||
movieId={event.id}
|
movieId={event.id}
|
||||||
|
date={date}
|
||||||
{...event}
|
{...event}
|
||||||
onEventModalOpenToggle={onEventModalOpenToggle}
|
onEventModalOpenToggle={onEventModalOpenToggle}
|
||||||
/>
|
/>
|
||||||
|
@ -22,7 +22,7 @@ function createCalendarEventsConnector() {
|
|||||||
(state) => state.calendar.items,
|
(state) => state.calendar.items,
|
||||||
(date, items) => {
|
(date, items) => {
|
||||||
const filtered = _.filter(items, (item) => {
|
const filtered = _.filter(items, (item) => {
|
||||||
return moment(date).isSame(moment(item.inCinemas), 'day');
|
return moment(date).isSame(moment(item.inCinemas), 'day') || moment(date).isSame(moment(item.physicalRelease), 'day');
|
||||||
});
|
});
|
||||||
|
|
||||||
return sort(filtered);
|
return sort(filtered);
|
||||||
|
@ -38,7 +38,8 @@ class CalendarEvent extends Component {
|
|||||||
queueItem,
|
queueItem,
|
||||||
showMovieInformation,
|
showMovieInformation,
|
||||||
showCutoffUnmetIcon,
|
showCutoffUnmetIcon,
|
||||||
colorImpairedMode
|
colorImpairedMode,
|
||||||
|
date
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const startTime = moment(inCinemas);
|
const startTime = moment(inCinemas);
|
||||||
@ -47,6 +48,7 @@ class CalendarEvent extends Component {
|
|||||||
const statusStyle = getStatusStyle(hasFile, isDownloading, startTime, isMonitored);
|
const statusStyle = getStatusStyle(hasFile, isDownloading, startTime, isMonitored);
|
||||||
const joinedGenres = genres.slice(0, 2).join(', ');
|
const joinedGenres = genres.slice(0, 2).join(', ');
|
||||||
const link = `/movie/${titleSlug}`;
|
const link = `/movie/${titleSlug}`;
|
||||||
|
const eventType = moment(date).isSame(moment(inCinemas), 'day') ? 'In Cinemas' : 'Physical Release';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@ -104,6 +106,15 @@ class CalendarEvent extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
showMovieInformation &&
|
||||||
|
<div className={styles.movieInfo}>
|
||||||
|
<div className={styles.genres}>
|
||||||
|
{eventType}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -125,7 +136,8 @@ CalendarEvent.propTypes = {
|
|||||||
showMovieInformation: PropTypes.bool.isRequired,
|
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,
|
||||||
|
date: PropTypes.string.isRequired
|
||||||
// onEventModalOpenToggle: PropTypes.func.isRequired
|
// onEventModalOpenToggle: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user