diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-02 19:06:30 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-02 19:06:30 -0300 |
commit | 90e6cfcfb8c2c43228a13396ff0f6fb87c2c1589 (patch) | |
tree | 7ef28d97e13c94e3afe767116fb6f2aa736d6223 /src/content | |
parent | d00f71c185123b4d68ab4738e5dc0edae06d6762 (diff) |
content: fix misc. areas assuming coverArtDate present
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateArtistInfoPageArtworksChunkedList.js | 10 | ||||
-rw-r--r-- | src/content/dependencies/generateTrackInfoPage.js | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageArtworksChunkedList.js b/src/content/dependencies/generateArtistInfoPageArtworksChunkedList.js index aa6efe5e..adfee1da 100644 --- a/src/content/dependencies/generateArtistInfoPageArtworksChunkedList.js +++ b/src/content/dependencies/generateArtistInfoPageArtworksChunkedList.js @@ -30,7 +30,7 @@ export default { entry: { type: 'albumCover', album: album, - date: album.coverArtDate, + date: album.coverArtDate ?? album.date, contribs: album.coverArtistContribs, }, })), @@ -40,7 +40,7 @@ export default { entry: { type: 'albumWallpaper', album: album, - date: album.coverArtDate, + date: album.coverArtDate ?? album.date, contribs: album.wallpaperArtistContribs, }, })), @@ -50,7 +50,7 @@ export default { entry: { type: 'albumBanner', album: album, - date: album.coverArtDate, + date: album.coverArtDate ?? album.date, contribs: album.bannerArtistContribs, }, })), @@ -60,7 +60,7 @@ export default { entry: { type: 'trackCover', album: track.album, - date: track.coverArtDate, + date: track.coverArtDate ?? track.album.date, track: track, contribs: track.coverArtistContribs, }, @@ -69,7 +69,7 @@ export default { sortEntryThingPairs(entries, things => sortAlbumsTracksChronologically(things, { - getDate: thing => thing.coverArtDate, + getDate: thing => thing.coverArtDate ?? thing.date, })); const chunks = diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 1083d863..93334948 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -82,7 +82,7 @@ export default { ...artist.albumsAsCoverArtist, ...artist.tracksAsCoverArtist, ], { - getDate: albumOrTrack => albumOrTrack.coverArtDate, + getDate: thing => thing.coverArtDate ?? thing.date, }), }), |