diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2026-07-04 13:19:47 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2026-07-04 13:19:47 -0300 |
| commit | 46d936a5485d69551a3c30c5d9a1400f7fa3cd42 (patch) | |
| tree | 85f790e9b1378d335291afe3d6de964b2ffcbc0e /src/content/dependencies | |
| parent | 26c6d6ccb887cbdac10d26160c923d2afcc7d521 (diff) | |
data: Album.hideTracKSectionDurations, TrackSection.hideDuration
Diffstat (limited to 'src/content/dependencies')
| -rw-r--r-- | src/content/dependencies/generateAlbumTrackList.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/content/dependencies/generateAlbumTrackList.js b/src/content/dependencies/generateAlbumTrackList.js index d40fb259..6c8a21c2 100644 --- a/src/content/dependencies/generateAlbumTrackList.js +++ b/src/content/dependencies/generateAlbumTrackList.js @@ -87,7 +87,9 @@ export default { data.trackSectionDurations = album.trackSections .map(section => - accumulateSum(section.tracks, track => track.duration)); + (section.hideDuration + ? null + : accumulateSum(section.tracks, track => track.duration))); data.trackSectionDurationsApproximate = album.trackSections @@ -159,7 +161,7 @@ export default { language.encapsulate(capsule, capsule => { const options = {section: name}; - if (duration !== 0) { + if (duration) { capsule += '.withDuration'; options.duration = language.formatDuration(duration, { |