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
|
||||
key={event.id}
|
||||
movieId={event.id}
|
||||
date={date}
|
||||
{...event}
|
||||
onEventModalOpenToggle={onEventModalOpenToggle}
|
||||
/>
|
||||
|
@ -22,7 +22,7 @@ function createCalendarEventsConnector() {
|
||||
(state) => state.calendar.items,
|
||||
(date, items) => {
|
||||
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);
|
||||
|
@ -38,7 +38,8 @@ class CalendarEvent extends Component {
|
||||
queueItem,
|
||||
showMovieInformation,
|
||||
showCutoffUnmetIcon,
|
||||
colorImpairedMode
|
||||
colorImpairedMode,
|
||||
date
|
||||
} = this.props;
|
||||
|
||||
const startTime = moment(inCinemas);
|
||||
@ -47,6 +48,7 @@ class CalendarEvent extends Component {
|
||||
const statusStyle = getStatusStyle(hasFile, isDownloading, startTime, isMonitored);
|
||||
const joinedGenres = genres.slice(0, 2).join(', ');
|
||||
const link = `/movie/${titleSlug}`;
|
||||
const eventType = moment(date).isSame(moment(inCinemas), 'day') ? 'In Cinemas' : 'Physical Release';
|
||||
|
||||
return (
|
||||
<div>
|
||||
@ -104,6 +106,15 @@ class CalendarEvent extends Component {
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
showMovieInformation &&
|
||||
<div className={styles.movieInfo}>
|
||||
<div className={styles.genres}>
|
||||
{eventType}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</Link>
|
||||
|
||||
</div>
|
||||
@ -125,7 +136,8 @@ CalendarEvent.propTypes = {
|
||||
showMovieInformation: PropTypes.bool.isRequired,
|
||||
showCutoffUnmetIcon: PropTypes.bool.isRequired,
|
||||
timeFormat: PropTypes.string.isRequired,
|
||||
colorImpairedMode: PropTypes.bool.isRequired
|
||||
colorImpairedMode: PropTypes.bool.isRequired,
|
||||
date: PropTypes.string.isRequired
|
||||
// onEventModalOpenToggle: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user