Skip to content

Commit

Permalink
Add German Hunger Games songs (Safe & Sound, Eyes Open)
Browse files Browse the repository at this point in the history
  • Loading branch information
fyrk committed Sep 12, 2024
1 parent 9573e20 commit 85318f3
Show file tree
Hide file tree
Showing 6 changed files with 407 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "VITE_SPOTIFY_REDIRECT_URI=http://localhost:4173 vite preview"
},
"dependencies": {
"@heroicons/react": "^2.0.18",
Expand Down
7 changes: 7 additions & 0 deletions scripts/fetchTaylorAlbums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,21 @@ for (const id of [
"2Z2KdJE0nGGu0qdWA45mza",
// Love Story (Pop Mix)
"1iab5rfjNpGhoPlFzPyp4k",
// Die Tribute Von Panem/The Hunger Games: Songs From District 12 And Beyond [GERMAN EDITION!; market = AT, CH, DE]
"3ia8zOFkXVGPbDLNyhCT0b",
]) {
if (simplifiedAlbums.some(a => a.id === id)) {
console.log("manual album id is now present:", id)
continue
}
const album = await spotify.albums.get(id)
simplifiedAlbums.push({ ...album, album_group: null })
}

const albums: FullAlbum[] = []

for (const album of simplifiedAlbums) {
await new Promise(resolve => setTimeout(resolve, 1000)) // rate limit workaround ...
console.log(album.name)
const simplifiedTracks: SimplifiedTrack[] = []
for await (const { item } of getPaginatedItems(
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "fetchTaylorAlbums.ts",
"type": "module",
"scripts": {
"start": "node --loader ts-node/esm --experimental-specifier-resolution node fetchTaylorAlbums.ts"
"start": "node --loader ts-node/esm --experimental-specifier-resolution=\"node\" fetchTaylorAlbums.ts"
},
"dependencies": {
"@spotify/web-api-ts-sdk": "^1.1.2",
Expand Down
Loading

0 comments on commit 85318f3

Please sign in to comment.