« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/page/artist.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/page/artist.js')
-rw-r--r--src/page/artist.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/page/artist.js b/src/page/artist.js
index 1b5a5060..6dd2ef30 100644
--- a/src/page/artist.js
+++ b/src/page/artist.js
@@ -87,6 +87,7 @@ export function write(artist, {wikiData}) {
         date: +track.date,
         album: track.album,
         duration: track.duration,
+        originalReleaseTrack: track.originalReleaseTrack,
         artists: track.artistContribs.some(({who}) => who === artist)
           ? track.artistContribs.filter(({who}) => who !== artist)
           : track.contributorContribs.filter(({who}) => who !== artist),
@@ -103,11 +104,11 @@ export function write(artist, {wikiData}) {
       date,
       album,
       chunk,
-      duration: getTotalDuration(chunk),
+      duration: getTotalDuration(chunk, {originalReleasesOnly: true}),
     }));
 
   const trackListChunks = chunkTracks(allTracks);
-  const totalDuration = getTotalDuration(allTracks);
+  const totalDuration = getTotalDuration(allTracks.filter(t => !t.originalReleaseTrack));
 
   const countGroups = (things) => {
     const usedGroups = things.flatMap(