diff options
Diffstat (limited to 'src/util/wiki-data.js')
-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); } |