chore: lighter builds

This commit is contained in:
Cory Dransfeldt 2024-10-18 07:27:18 -07:00
parent e3cec3c374
commit 8b2648f23f
No known key found for this signature in database
18 changed files with 84 additions and 408 deletions

View file

@ -43,10 +43,6 @@ export default async function fetchMusicData() {
monthArtists,
monthAlbums,
monthGenres,
threeMonthTracks,
threeMonthArtists,
threeMonthAlbums,
threeMonthGenres,
] = await Promise.all([
fetchDataFromView('recent_tracks'),
fetchDataFromView('week_tracks'),
@ -57,10 +53,6 @@ export default async function fetchMusicData() {
fetchDataFromView('month_artists'),
fetchDataFromView('month_albums'),
fetchDataFromView('month_genres'),
fetchDataFromView('three_month_tracks'),
fetchDataFromView('three_month_artists'),
fetchDataFromView('three_month_albums'),
fetchDataFromView('three_month_genres'),
])
return {
@ -83,15 +75,6 @@ export default async function fetchMusicData() {
.reduce((acc, track) => acc + track.plays, 0)
.toLocaleString('en-US'),
},
threeMonth: {
tracks: threeMonthTracks,
artists: threeMonthArtists,
albums: threeMonthAlbums,
genres: threeMonthGenres,
totalTracks: threeMonthTracks
.reduce((acc, track) => acc + track.plays, 0)
.toLocaleString('en-US'),
},
}
} catch (error) {
console.error('Error fetching and processing music data:', error)