From 7aada933da5bf80bf36fde8b46512080ca23775e Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 10 Jul 2024 09:25:29 -0700 Subject: [PATCH] fix: upcoming albums --- package-lock.json | 4 ++-- package.json | 2 +- src/_data/albumReleases.js | 11 +++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 05aba4ce..f48740a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "20.0.1", + "version": "20.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "20.0.1", + "version": "20.0.2", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.4.0", diff --git a/package.json b/package.json index eb99ff30..59e8c201 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "20.0.1", + "version": "20.0.2", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": { diff --git a/src/_data/albumReleases.js b/src/_data/albumReleases.js index f3e92df5..94c2fa3b 100644 --- a/src/_data/albumReleases.js +++ b/src/_data/albumReleases.js @@ -13,11 +13,11 @@ export default async function () { .select(` name, key, - image, release_date, release_link, total_plays, - artists (name_string, mbid, country) + art(filename_disk), + artists(name_string, mbid, country) `) .gt('release_date', today) @@ -26,17 +26,16 @@ export default async function () { return } - return data.filter(album => !album['total_plays'] || !album['total_plays'] > 0).map(album => { - return { + return data.filter(album => !album['total_plays'] || !album['total_plays'] > 0).map(album => ({ artist: album['artists']['name_string'], title: album['name'], date: DateTime.fromISO(album['release_date']).toLocaleString(DateTime.DATE_FULL), url: album['release_link'], - image: album['image'], + image: `/${album?.['art']?.['filename_disk']}` || '', artist_url: `/music/artists/${sanitizeMediaString(album['artists']['name_string'])}-${sanitizeMediaString(parseCountryField(album['artists']['country']))}`, mbid: album['artists']['mbid'], timestamp: DateTime.fromISO(album['release_date']).toSeconds(), type: 'album-release' } - }).sort((a, b) => a.timestamp - b.timestamp) + )).sort((a, b) => a.timestamp - b.timestamp) }