diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateGroupGalleryPage.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/content/dependencies/generateGroupGalleryPage.js b/src/content/dependencies/generateGroupGalleryPage.js index 168bf799..d7984416 100644 --- a/src/content/dependencies/generateGroupGalleryPage.js +++ b/src/content/dependencies/generateGroupGalleryPage.js @@ -103,6 +103,9 @@ export default { data.totalDuration = getTotalDuration(tracks, {originalReleasesOnly: true}); data.gridNames = albums.map(album => album.name); + data.gridDurations = albums.map(album => getTotalDuration(album.tracks)); + data.gridNumTracks = albums.map(album => album.tracks.length); + data.gridPaths = albums.map(album => (album.hasCoverArt @@ -186,6 +189,15 @@ export default { album: name, }), })), + info: + stitchArrays({ + numTracks: data.gridNumTracks, + duration: data.gridDurations, + }).map(({numTracks, duration}) => + language.$('misc.albumGrid.details', { + tracks: language.countTracks(numTracks, {unit: true}), + time: language.formatDuration(duration), + })), }), ], |