diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-11-27 01:30:24 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-11-27 01:30:24 -0400 |
commit | 398e8c25073a88cbf7e9861445c87dc9e995978a (patch) | |
tree | bd7567bffa6afb23e242be11cc36bc5fd95c810b /src/util | |
parent | dd4e642b381f1af8f235a1eff4eb886b12be31ad (diff) |
only count originals for total duration in most places
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/wiki-data.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index f0812a08..c93cb661 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -395,7 +395,13 @@ export function getFlashLink(flash) { return `https://homestuck.com/story/${flash.page}`; } -export function getTotalDuration(tracks) { +export function getTotalDuration(tracks, { + originalReleasesOnly = false, +} = {}) { + if (originalReleasesOnly) { + tracks = tracks.filter(t => !t.originalReleaseTrack); + } + return accumulateSum(tracks, track => track.duration); } |