« get me outta code hell

fix missing album duration...... oops - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-12-06 08:16:27 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-12-06 08:16:27 -0400
commitb494fd1a9f4c77994a239ce12b04cafa5ae3315d (patch)
tree6b93d8c335a1f119b2807edbcc531174aa36d9b8 /src
parent19b832b91b882293f0b145941961c880671fddef (diff)
fix missing album duration...... oops
Diffstat (limited to 'src')
-rw-r--r--src/listing-spec.js3
-rw-r--r--src/page/album.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index e01912cd..e96955d9 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -52,7 +52,7 @@ const listingSpec = [
           album,
           duration: getTotalDuration(album.tracks),
         }))
-        .filter(album => album.duration)
+        .filter(({duration}) => duration > 0)
         .sort((a, b) => b.duration - a.duration),
 
     row: ({album, duration}, {language, link}) =>
@@ -531,6 +531,7 @@ const listingSpec = [
             group.albums.flatMap(album => album.tracks),
             {originalReleasesOnly: true}),
         }))
+        .filter(({duration}) => duration > 0)
         .sort((a, b) => b.duration - a.duration),
 
     row: ({group, duration}, {language, link}) =>
diff --git a/src/page/album.js b/src/page/album.js
index 1a90a79c..f2c35a14 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -212,7 +212,7 @@ export function write(album, {wikiData}) {
                     date: language.formatDate(album.coverArtDate),
                   }),
 
-                album.duration > 0 &&
+                albumDuration > 0 &&
                   language.$('releaseInfo.duration', {
                     duration: language.formatDuration(albumDuration, {
                       approximate: album.tracks.length > 1,