« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/wiki-data.js8
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);
 }