Fixed: Calendar Links to Artist/Album

#382
pull/431/head
Qstick 6 years ago
parent 9aa40f546f
commit 0b4495e92d

@ -41,9 +41,11 @@ class AgendaEvent extends Component {
id,
artist,
title,
foreignAlbumId,
albumType,
releaseDate,
monitored,
hasFile,
// hasFile,
grabbed,
queueItem,
showDate,
@ -55,7 +57,7 @@ class AgendaEvent extends Component {
// const endTime = startTime.add(artist.runtime, 'minutes');
const downloading = !!(queueItem || grabbed);
const isMonitored = artist.monitored && monitored;
const statusStyle = getStatusStyle(id, hasFile, downloading, startTime, isMonitored);
const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored);
return (
<div>
@ -83,13 +85,17 @@ class AgendaEvent extends Component {
</div>
<div className={styles.artistName}>
{artist.artistName}
<Link to={`/artist/${artist.foreignArtistId}`}>
{artist.artistName}
</Link>
</div>
<div className={styles.albumSeparator}> - </div>
<div className={styles.albumTitle}>
{title}
<Link to={`/album/${foreignAlbumId}`}>
{title}
</Link>
</div>
{
@ -116,9 +122,11 @@ AgendaEvent.propTypes = {
id: PropTypes.number.isRequired,
artist: PropTypes.object.isRequired,
title: PropTypes.string.isRequired,
foreignAlbumId: PropTypes.string.isRequired,
albumType: PropTypes.string.isRequired,
releaseDate: PropTypes.string.isRequired,
monitored: PropTypes.bool.isRequired,
hasFile: PropTypes.bool.isRequired,
// hasFile: PropTypes.bool.isRequired,
grabbed: PropTypes.bool,
queueItem: PropTypes.object,
showDate: PropTypes.bool.isRequired,

@ -46,9 +46,7 @@ class CalendarEvent extends Component {
id,
artist,
title,
// seasonNumber,
// episodeNumber,
// absoluteEpisodeNumber,
foreignAlbumId,
releaseDate,
monitored,
// hasFile,
@ -63,7 +61,6 @@ class CalendarEvent extends Component {
const downloading = !!(queueItem || grabbed);
const isMonitored = artist.monitored && monitored;
const statusStyle = getStatusStyle(id, downloading, startTime, isMonitored);
// const missingAbsoluteNumber = artist.artistType === 'anime' && seasonNumber > 0 && !absoluteEpisodeNumber;
return (
<div>
@ -78,7 +75,9 @@ class CalendarEvent extends Component {
>
<div className={styles.info}>
<div className={styles.artistName}>
{artist.artistName}
<Link to={`/artist/${artist.foreignArtistId}`}>
{artist.artistName}
</Link>
</div>
{
@ -102,7 +101,9 @@ class CalendarEvent extends Component {
<div className={styles.albumInfo}>
<div className={styles.albumTitle}>
{title}
<Link to={`/album/${foreignAlbumId}`}>
{title}
</Link>
</div>
</div>
</Link>
@ -115,6 +116,7 @@ CalendarEvent.propTypes = {
id: PropTypes.number.isRequired,
artist: PropTypes.object.isRequired,
title: PropTypes.string.isRequired,
foreignAlbumId: PropTypes.string.isRequired,
// seasonNumber: PropTypes.number.isRequired,
// episodeNumber: PropTypes.number.isRequired,
// absoluteEpisodeNumber: PropTypes.number,

Loading…
Cancel
Save