diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-21 07:10:34 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-21 07:11:15 -0400 |
commit | 288715112687d33c3193ebae469aaf7d01a52b6d (patch) | |
tree | ad88c8681143b4a09454a3340a23748ddb73636e /src/content | |
parent | 0807f466104c11033abe3e79c528cd409329415d (diff) |
upd8, content: preload all file sizes, straight-shot
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateAlbumAdditionalFilesList.js | 6 | ||||
-rw-r--r-- | src/content/dependencies/image.js | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/content/dependencies/generateAlbumAdditionalFilesList.js b/src/content/dependencies/generateAlbumAdditionalFilesList.js index 9818a43c..ad17206f 100644 --- a/src/content/dependencies/generateAlbumAdditionalFilesList.js +++ b/src/content/dependencies/generateAlbumAdditionalFilesList.js @@ -9,7 +9,7 @@ export default { 'transformContent', ], - extraDependencies: ['getSizeOfAdditionalFile', 'html', 'urls'], + extraDependencies: ['getSizeOfMediaFile', 'html', 'urls'], relations: (relation, album, additionalFiles) => ({ list: @@ -55,7 +55,7 @@ export default { showFileSizes: {type: 'boolean', default: true}, }, - generate: (data, relations, slots, {getSizeOfAdditionalFile, urls}) => + generate: (data, relations, slots, {getSizeOfMediaFile, urls}) => relations.list.slots({ chunks: stitchArrays({ @@ -86,7 +86,7 @@ export default { fileLink: fileLink, fileSize: (slots.showFileSizes - ? getSizeOfAdditionalFile( + ? getSizeOfMediaFile( urls .from('media.root') .to('media.albumAdditionalFile', data.albumDirectory, location)) diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js index b1f02819..6cbcb7dd 100644 --- a/src/content/dependencies/image.js +++ b/src/content/dependencies/image.js @@ -5,7 +5,7 @@ export default { extraDependencies: [ 'checkIfImagePathHasCachedThumbnails', 'getDimensionsOfImagePath', - 'getSizeOfImagePath', + 'getSizeOfMediaFile', 'getThumbnailEqualOrSmaller', 'getThumbnailsAvailableForDimensions', 'html', @@ -83,7 +83,7 @@ export default { generate(data, relations, slots, { checkIfImagePathHasCachedThumbnails, getDimensionsOfImagePath, - getSizeOfImagePath, + getSizeOfMediaFile, getThumbnailEqualOrSmaller, getThumbnailsAvailableForDimensions, html, @@ -228,7 +228,7 @@ export default { const fileSize = (willLink && mediaSrc - ? getSizeOfImagePath(mediaSrc) + ? getSizeOfMediaFile(mediaSrc) : null); imgAttributes.add([ |