« get me outta code hell

Merge branch 'preview' into listing-tweaks - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/listArtistsByLatestContribution.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-09 14:42:24 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-09 14:42:24 -0400
commitaa30c888ea2307931c555db474d709f520c551a8 (patch)
treeb23042b5b575862d83f401b5fa21f8b45f7988ff /src/content/dependencies/listArtistsByLatestContribution.js
parente71230340181a3b7b38ff05ba23504b264f5b26c (diff)
parentb62622d3cd8ffe1ed517ceb873d9352943c4a601 (diff)
Merge branch 'preview' into listing-tweaks
Diffstat (limited to 'src/content/dependencies/listArtistsByLatestContribution.js')
-rw-r--r--src/content/dependencies/listArtistsByLatestContribution.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/content/dependencies/listArtistsByLatestContribution.js b/src/content/dependencies/listArtistsByLatestContribution.js
index edb02e0..45f8390 100644
--- a/src/content/dependencies/listArtistsByLatestContribution.js
+++ b/src/content/dependencies/listArtistsByLatestContribution.js
@@ -97,14 +97,14 @@ export default {
         ...getArtists(album, 'bannerArtistContribs'),
       ])) {
         // Might combine later with 'track' of the same album and date.
-        considerDate(artist, album.coverArtDate, album, 'artwork');
+        considerDate(artist, album.coverArtDate ?? album.date, album, 'artwork');
       }
     }
 
     for (const track of tracksLatestFirst) {
       for (const artist of getArtists(track, 'coverArtistContribs')) {
         // No special effect if artist already has 'artwork' for the same album and date.
-        considerDate(artist, track.coverArtDate, track.album, 'artwork');
+        considerDate(artist, track.coverArtDate ?? track.date, track.album, 'artwork');
       }
 
       for (const artist of new Set([
@@ -199,10 +199,6 @@ export default {
         }
       });
 
-    // Last off, turn the flat sorted list into a proper chunked list, now that
-    // entries going in the same chunk are sorted correctly next to each other.
-    // Then extract the parts that are useful for displaying on the listing!
-
     const chunks =
       chunkMultipleArrays(artistThings, artistDates, artistContributions, artists,
         (thing, lastThing, date, lastDate) =>