diff --git a/package.json b/package.json index 31d9eb70..5257137f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "9.8.0", + "version": "9.8.1", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": { diff --git a/src/_data/helpers/music.js b/src/_data/helpers/music.js index 19039e94..4ff43f0d 100644 --- a/src/_data/helpers/music.js +++ b/src/_data/helpers/music.js @@ -76,7 +76,7 @@ export const buildChart = (tracks, artists, albums, nowPlaying = {}) => { } } -export const buildTracksWithArt = (tracks, albums) => { +export const buildTracksWithArt = (tracks, artists, albums) => { tracks.forEach(track => { track['image'] = albums[albumSanitizedKey(track['album'])]?.['image'] || `https://cdn.coryd.dev/albums/${sanitizeMediaString(track['artist']).replace(/\s+/g, '-').toLowerCase()}-${sanitizeMediaString(track['album'].replace(/[:\/\\,'']+/g , '').replace(/\s+/g, '-').toLowerCase())}.jpg` diff --git a/src/_data/musicCharts.js b/src/_data/musicCharts.js index b14558b3..c813c6da 100644 --- a/src/_data/musicCharts.js +++ b/src/_data/musicCharts.js @@ -8,7 +8,7 @@ export default async function () { const albums = JSON.parse(await readFile('./src/_data/json/albums-map.json', 'utf8')); const recent = JSON.parse(await readFile('./src/_data/json/scrobbles-window.json', 'utf8'))['data'].reverse().splice(0,10) return { - recent: buildTracksWithArt(recent, albums), + recent: buildTracksWithArt(recent, artists, albums), month: buildChart(monthChart['data'], artists, albums), threeMonthChart: buildChart(threeMonthChart['data'], artists, albums), }