From f1223b73ee9a609db286903f34776e36a99e713b Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 5 Apr 2024 09:47:36 -0700 Subject: [PATCH] chore: fewer windows --- package.json | 2 +- plugins/fetch-scrobbles/index.js | 8 -------- src/_data/musicCharts.js | 2 -- src/_includes/now.liquid | 8 -------- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/package.json b/package.json index 9be6effe..c55a1b8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "9.5.0", + "version": "9.5.1", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": { diff --git a/plugins/fetch-scrobbles/index.js b/plugins/fetch-scrobbles/index.js index 6e41f8de..579370ce 100644 --- a/plugins/fetch-scrobbles/index.js +++ b/plugins/fetch-scrobbles/index.js @@ -28,8 +28,6 @@ export const onPreBuild = async ({ constants }) => { const monthChartData = { data: [] } const threeMonthKeys = getKeys(3) const threeMonthChartData = { data: [] } - const sixMonthKeys = getKeys(6) - const sixMonthChartData = { data: [] } const scrobbles = getStore('scrobbles') const artists = getStore('artists') const albums = getStore('albums') @@ -48,16 +46,10 @@ export const onPreBuild = async ({ constants }) => { threeMonthChartData['data'].push(...scrobbleData['data']) } - for (const key of sixMonthKeys) { - const scrobbleData = await scrobbles.get(key, { type: 'json'}) - sixMonthChartData['data'].push(...scrobbleData['data']) - } - fs.writeFileSync('./src/_data/json/scrobbles-window.json', JSON.stringify(windowData)) fs.writeFileSync('./src/_data/json/artists-map.json', JSON.stringify(artistsMap)) fs.writeFileSync('./src/_data/json/albums-map.json', JSON.stringify(albumsMap)) fs.writeFileSync('./src/_data/json/now-playing.json', JSON.stringify(nowPlaying)) fs.writeFileSync('./src/_data/json/scrobbles-month-chart.json', JSON.stringify(monthChartData)) fs.writeFileSync('./src/_data/json/scrobbles-three-month-chart.json', JSON.stringify(threeMonthChartData)) - fs.writeFileSync('./src/_data/json/scrobbles-six-month-chart.json', JSON.stringify(sixMonthChartData)) } \ No newline at end of file diff --git a/src/_data/musicCharts.js b/src/_data/musicCharts.js index 36569808..d5dcad0e 100644 --- a/src/_data/musicCharts.js +++ b/src/_data/musicCharts.js @@ -4,12 +4,10 @@ import { buildChart } from './helpers/music.js' export default async function () { const monthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-month-chart.json', 'utf8')); const threeMonthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-three-month-chart.json', 'utf8')); - const sixMonthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-six-month-chart.json', 'utf8')); const artists = JSON.parse(await readFile('./src/_data/json/artists-map.json', 'utf8')); const albums = JSON.parse(await readFile('./src/_data/json/albums-map.json', 'utf8')); return { month: buildChart(monthChart['data'], artists, albums), threeMonthChart: buildChart(threeMonthChart['data'], artists, albums), - sixMonthChart: buildChart(sixMonthChart['data'], artists, albums), } } \ No newline at end of file diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 3ca519a3..5c8a2023 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -22,7 +22,6 @@ layout: default -
@@ -34,9 +33,6 @@ layout: default -

{% tablericon "vinyl" "Albums" %} @@ -46,7 +42,6 @@ layout: default -

@@ -58,9 +53,6 @@ layout: default - {% render "partials/now/albumReleases.liquid", albumReleases:albumReleases %}

{% tablericon "books" "Books" %}