diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-01-15 20:28:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 20:28:18 -0400 |
commit | acc7f548dd73c36d86acd6497e67040a824dcc72 (patch) | |
tree | 45b5e200b49040def7378bd697da36eef48301b7 /src | |
parent | 88d1a8adde1aadd5abfe80ea0b55bf359160460b (diff) | |
parent | 4afee4aa8b8af89fcc00bcabaf6cf02176eb77da (diff) |
Merge pull request #137 from hsmusic/tracks-by-date-fixes
"Tracks - by Date" listing fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/listing-spec.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js index 636e5f67..26910c05 100644 --- a/src/listing-spec.js +++ b/src/listing-spec.js @@ -615,9 +615,12 @@ const listingSpec = [ directory: 'tracks/by-date', stringsKey: 'listTracks.byDate', - data: ({wikiData: {trackData}}) => + data: ({wikiData: {albumData}}) => chunkByProperties( - sortChronologically(trackData.filter(t => t.date)), + sortByDate( + sortChronologically(albumData) + .flatMap(album => album.tracks) + .filter(track => track.date)), ['album', 'date']), html: (data, {html, language, link}) => @@ -632,7 +635,7 @@ const listingSpec = [ html.tag('dd', html.tag('ul', tracks.map(track => - track.aka + track.originalReleaseTrack ? html.tag('li', {class: 'rerelease'}, language.$('listingPage.listTracks.byDate.track.rerelease', { |