diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/listArtistsByDuration.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/content/dependencies/listArtistsByDuration.js b/src/content/dependencies/listArtistsByDuration.js index f677d82c..66fab8be 100644 --- a/src/content/dependencies/listArtistsByDuration.js +++ b/src/content/dependencies/listArtistsByDuration.js @@ -1,5 +1,5 @@ import {sortAlphabetically, sortByCount} from '#sort'; -import {filterByCount, stitchArrays} from '#sugar'; +import {filterByCount, stitchArrays, unique} from '#sugar'; import {getTotalDuration} from '#wiki-data'; export default { @@ -17,10 +17,12 @@ export default { const durations = artists.map(artist => - getTotalDuration([ - ...(artist.tracksAsArtist ?? []), - ...(artist.tracksAsContributor ?? []), - ], {originalReleasesOnly: true})); + getTotalDuration( + unique([ + ...(artist.tracksAsArtist ?? []), + ...(artist.tracksAsContributor ?? []), + ]), + {originalReleasesOnly: true})); filterByCount(artists, durations); sortByCount(artists, durations, {greatestFirst: true}); |