From 9b4ae017439f0559ec68e6821b5b2f3a20169a38 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 5 Apr 2024 09:45:10 -0700 Subject: [PATCH] chore: fewer windows --- plugins/fetch-scrobbles/index.js | 8 -------- src/_data/musicCharts.js | 2 -- src/_includes/now.liquid | 8 -------- 3 files changed, 18 deletions(-) diff --git a/plugins/fetch-scrobbles/index.js b/plugins/fetch-scrobbles/index.js index 4c61af55..6e41f8de 100644 --- a/plugins/fetch-scrobbles/index.js +++ b/plugins/fetch-scrobbles/index.js @@ -30,8 +30,6 @@ export const onPreBuild = async ({ constants }) => { const threeMonthChartData = { data: [] } const sixMonthKeys = getKeys(6) const sixMonthChartData = { data: [] } - const oneYearKeys = getKeys(12) - const oneYearChartData = { data: [] } const scrobbles = getStore('scrobbles') const artists = getStore('artists') const albums = getStore('albums') @@ -55,11 +53,6 @@ export const onPreBuild = async ({ constants }) => { sixMonthChartData['data'].push(...scrobbleData['data']) } - for (const key of oneYearKeys) { - const scrobbleData = await scrobbles.get(key, { type: 'json'}) - oneYearChartData['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)) @@ -67,5 +60,4 @@ export const onPreBuild = async ({ constants }) => { 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)) - fs.writeFileSync('./src/_data/json/scrobbles-one-year-chart.json', JSON.stringify(oneYearChartData)) } \ No newline at end of file diff --git a/src/_data/musicCharts.js b/src/_data/musicCharts.js index ab8465b9..36569808 100644 --- a/src/_data/musicCharts.js +++ b/src/_data/musicCharts.js @@ -5,13 +5,11 @@ 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 oneYearChart = JSON.parse(await readFile('./src/_data/json/scrobbles-one-year-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), - oneYearChart: buildChart(sixMonthChart['data'], artists, albums), } } \ No newline at end of file diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index f2a7098c..3ca519a3 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -23,7 +23,6 @@ layout: default -
@@ -38,9 +37,6 @@ layout: default -

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

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

{% tablericon "books" "Books" %}