diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-04-26 19:42:19 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:06 -0300 |
commit | 7606e0e15172d5cb493f1caa489140c7b99aa1c6 (patch) | |
tree | e9800144d5ba09b7bb300f283496d9b43b9cef8c /src/content | |
parent | aba51f9096e656c0f6efc5efceea150b6c960bda (diff) |
content: listArtistsByDuration: use Artist.totalDurations
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/listArtistsByDuration.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/content/dependencies/listArtistsByDuration.js b/src/content/dependencies/listArtistsByDuration.js index 66fab8be..6b2a18a0 100644 --- a/src/content/dependencies/listArtistsByDuration.js +++ b/src/content/dependencies/listArtistsByDuration.js @@ -1,6 +1,5 @@ import {sortAlphabetically, sortByCount} from '#sort'; -import {filterByCount, stitchArrays, unique} from '#sugar'; -import {getTotalDuration} from '#wiki-data'; +import {filterByCount, stitchArrays} from '#sugar'; export default { contentDependencies: ['generateListingPage', 'linkArtist'], @@ -16,13 +15,7 @@ export default { artistData.filter(artist => !artist.isAlias)); const durations = - artists.map(artist => - getTotalDuration( - unique([ - ...(artist.tracksAsArtist ?? []), - ...(artist.tracksAsContributor ?? []), - ]), - {originalReleasesOnly: true})); + artists.map(artist => artist.totalDuration); filterByCount(artists, durations); sortByCount(artists, durations, {greatestFirst: true}); |