« 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
diff options
context:
space:
mode:
Diffstat (limited to 'src/page')
-rw-r--r--src/page/album.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/page/album.js b/src/page/album.js
index 8df8a678..76c9c5f0 100644
--- a/src/page/album.js
+++ b/src/page/album.js
@@ -109,10 +109,12 @@ export function write(album, {wikiData}) {
             getAlbumStylesheet,
             getArtistString,
             getLinkThemeString,
+            getSizeOfAdditionalFile,
             getThemeString,
             link,
             language,
-            transformMultiline
+            transformMultiline,
+            urls,
         }) => {
             const trackToListItem = bindOpts(unbound_trackToListItem, {
                 getArtistString,
@@ -219,7 +221,11 @@ export function write(album, {wikiData}) {
                             </${listTag}>
                         `}
                         ${hasAdditionalFiles && generateAdditionalFilesList(album.additionalFiles, {
-                            linkFile: file => link.albumAdditionalFile({album, file})
+                            // TODO: Kinda near the metal here...
+                            getFileSize: file => getSizeOfAdditionalFile(urls
+                                .from('media.root')
+                                .to('media.albumAdditionalFile', album.directory, file)),
+                            linkFile: file => link.albumAdditionalFile({album, file}),
                         })}
                         ${album.dateAddedToWiki && fixWS`
                             <p>