diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateAlbumGalleryPage.js | 16 | ||||
-rw-r--r-- | src/content/dependencies/generateArtTagGalleryPage.js | 11 | ||||
-rw-r--r-- | src/content/dependencies/generateArtistGalleryPage.js | 11 |
3 files changed, 33 insertions, 5 deletions
diff --git a/src/content/dependencies/generateAlbumGalleryPage.js b/src/content/dependencies/generateAlbumGalleryPage.js index f61b1983..b4f9268c 100644 --- a/src/content/dependencies/generateAlbumGalleryPage.js +++ b/src/content/dependencies/generateAlbumGalleryPage.js @@ -145,6 +145,18 @@ export default { : null)), ]; + data.dimensions = [ + (album.hasCoverArt + ? album.coverArtDimensions + : null), + + ... + album.tracks.map(track => + (track.hasUniqueCoverArt + ? track.coverArtDimensions + : null)), + ]; + return data; }, @@ -175,10 +187,12 @@ export default { stitchArrays({ image: relations.images, path: data.paths, + dimensions: data.dimensions, name: data.names, - }).map(({image, path, name}) => + }).map(({image, path, dimensions, name}) => image.slots({ path, + dimensions, missingSourceContent: language.$('misc.albumGalleryGrid.noCoverArt', {name}), })), diff --git a/src/content/dependencies/generateArtTagGalleryPage.js b/src/content/dependencies/generateArtTagGalleryPage.js index 962f1b7f..338d18fe 100644 --- a/src/content/dependencies/generateArtTagGalleryPage.js +++ b/src/content/dependencies/generateArtTagGalleryPage.js @@ -74,6 +74,9 @@ export default { ? ['media.trackCover', thing.album.directory, thing.directory, thing.coverArtFileExtension] : ['media.albumCover', thing.directory, thing.coverArtFileExtension])); + data.dimensions = + query.things.map(thing => thing.coverArtDimensions); + data.coverArtists = query.things.map(thing => thing.coverArtistContribs @@ -111,8 +114,12 @@ export default { stitchArrays({ image: relations.images, path: data.paths, - }).map(({image, path}) => - image.slot('path', path)), + dimensions: data.dimensions, + }).map(({image, path, dimensions}) => + image.slots({ + path, + dimensions, + })), info: data.coverArtists.map(names => diff --git a/src/content/dependencies/generateArtistGalleryPage.js b/src/content/dependencies/generateArtistGalleryPage.js index 13779159..36343c18 100644 --- a/src/content/dependencies/generateArtistGalleryPage.js +++ b/src/content/dependencies/generateArtistGalleryPage.js @@ -68,6 +68,9 @@ export default { ? ['media.trackCover', thing.album.directory, thing.directory, thing.coverArtFileExtension] : ['media.albumCover', thing.directory, thing.coverArtFileExtension])); + data.dimensions = + query.things.map(thing => thing.coverArtDimensions); + data.otherCoverArtists = query.things.map(thing => (thing.coverArtistContribs.length > 1 @@ -107,8 +110,12 @@ export default { stitchArrays({ image: relations.images, path: data.paths, - }).map(({image, path}) => - image.slot('path', path)), + dimensions: data.dimensions, + }).map(({image, path, dimensions}) => + image.slots({ + path, + dimensions, + })), info: data.otherCoverArtists.map(names => |