diff --git a/package.json b/package.json index b17609d..448f786 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/fetchTaylorAlbums.ts b/scripts/fetchTaylorAlbums.ts index 6eadf55..0e3e5d1 100644 --- a/scripts/fetchTaylorAlbums.ts +++ b/scripts/fetchTaylorAlbums.ts @@ -97,7 +97,13 @@ 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 }) } @@ -105,6 +111,7 @@ for (const id of [ 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( diff --git a/scripts/package.json b/scripts/package.json index f721056..a67c6e3 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -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", diff --git a/scripts/run/find_log.txt b/scripts/run/find_log.txt index 5626276..af9a014 100644 --- a/scripts/run/find_log.txt +++ b/scripts/run/find_log.txt @@ -1,3 +1,143 @@ +### I Can Do It With a Broken Heart + +I Can Do It With a Broken Heart + +I Can Do It With a Broken Heart - Instrumental + + + + +### Fortnight (Acoustic Version) + +Fortnight (feat. Post Malone) - Acoustic Version + +Fortnight (feat. Post Malone) - Cults Remix + +Fortnight (feat. Post Malone) + + + + +### Fortnight (feat. Post Malone) [BLOND:ISH Remix] + +Fortnight (feat. Post Malone) - BLOND:ISH Remix + +Fortnight (feat. Post Malone) + + + + +### THE TORTURED POETS DEPARTMENT: THE ANTHOLOGY + +Fortnight (feat. Post Malone) + +The Tortured Poets Department + +My Boy Only Breaks His Favorite Toys + +Down Bad + +So Long, London + +But Daddy I Love Him + +Fresh Out The Slammer + +Florida!!! (feat. Florence + The Machine) + +Guilty as Sin? + +Who’s Afraid of Little Old Me? + +I Can Fix Him (No Really I Can) + +loml + +I Can Do It With a Broken Heart + +The Smallest Man Who Ever Lived + +The Alchemy + +Clara Bow + +The Black Dog + +imgonnagetyouback + +The Albatross + +Chloe or Sam or Sophia or Marcus + +How Did It End? + +So High School + +I Hate It Here + +thanK you aIMee + +I Look in People's Windows + +The Prophecy + +Cassandra + +Peter + +The Bolter + +Robin + +The Manuscript + + + + +### THE TORTURED POETS DEPARTMENT + +Fortnight (feat. Post Malone) + +The Tortured Poets Department + +My Boy Only Breaks His Favorite Toys + +Down Bad + +So Long, London + +But Daddy I Love Him + +Fresh Out The Slammer + +Florida!!! (feat. Florence + The Machine) + +Guilty as Sin? + +Who’s Afraid of Little Old Me? + +I Can Fix Him (No Really I Can) + +loml + +I Can Do It With a Broken Heart + +The Smallest Man Who Ever Lived + +The Alchemy + +Clara Bow + + + + +### You're Losing Me (From The Vault) + +You’re Losing Me (From The Vault) + + + + ### 1989 (Taylor's Version) [Deluxe] Welcome To New York (Taylor's Version) @@ -100,6 +240,8 @@ Cruel Summer - Live from TS | The Eras Tour Cruel Summer - LP Giobbi Remix +Cruel Summer - LP Giobbi Remix - Extended Version + Cruel Summer @@ -725,6 +867,13 @@ If This Was A Movie (Taylor’s Version) +### Mr. Perfectly Fine (Taylor’s Version) (From The Vault) + +Mr. Perfectly Fine (Taylor’s Version) (From The Vault) + + + + ### You All Over Me (feat. Maren Morris) (Taylor’s Version) (From The Vault) You All Over Me (feat. Maren Morris) (Taylor’s Version) (From The Vault) @@ -785,6 +934,47 @@ it’s time to go - bonus track +### Christmas Tree Farm (Recorded Live at the 2019 iHeartRadio Jingle Ball) + +Christmas Tree Farm - Recorded Live at the 2019 iHeartRadio Jingle Ball + + + + +### willow (the witch collection) + +willow + +willow - dancing witch version (Elvira remix) + +willow - lonely witch version + +willow - moonlit witch version + + + + +### willow (moonlit witch version) + +willow - moonlit witch version + + + + +### willow (lonely witch version) + +willow - lonely witch version + + + + +### willow [dancing witch version (Elvira remix)] + +willow - dancing witch version (Elvira remix) + + + + ### evermore willow @@ -820,7 +1010,7 @@ evermore (feat. Bon Iver) -### folklore: the long pond studio sessions (from the Disney+ special) [deluxe edition] +### folklore: the long pond studio sessions (from the Disney+ special) - deluxe edition the 1 @@ -893,6 +1083,13 @@ the lakes - the long pond studio sessions +### betty (Live from the 2020 Academy of Country Music Awards) + +betty - Live from the 2020 Academy of Country Music Awards + + + + ### folklore (deluxe version) the 1 @@ -932,6 +1129,13 @@ the lakes - bonus track +### cardigan (cabin in candlelight version) + +cardigan - cabin in candlelight version + + + + ### folklore the 1 @@ -969,7 +1173,63 @@ hoax -### You're Not Sorry (CSI Remix) +### Cornelia Street (Live From Paris) + +Cornelia Street - Live From Paris + + + + +### You Need To Calm Down (Live From Paris) + +You Need To Calm Down - Live From Paris + + + + +### The Archer (Live From Paris) + +The Archer - Live From Paris + + + + +### ME! (Live From Paris) + +ME! - Live From Paris + + + + +### Lover (Live From Paris) + +Lover - Live From Paris + + + + +### Death By A Thousand Cuts (Live From Paris) + +Death By A Thousand Cuts - Live From Paris + + + + +### Daylight (Live From Paris) + +Daylight - Live From Paris + + + + +### The Man (Live From Paris) + +The Man - Live From Paris + + + + +### You're Not Sorry - CSI Remix You're Not Sorry - CSI Remix isRemixWithoutTV @@ -979,10 +1239,10 @@ You're Not Sorry - CSI Remix -### Love Story (Digital Dog Remix) +### Love Story - Pop Mix -Love Story - Digital Dog Remix - isRemixWithoutTV +Love Story - Pop Mix + isMixWithoutTV -> Love Story (Taylor’s Version) • Fearless (Taylor's Version) -> Love Story (Taylor’s Version) • Love Story (Taylor’s Version) -> Love Story (Taylor’s Version) • The More Fearless (Taylor’s Version) Chapter @@ -992,10 +1252,10 @@ Love Story - Digital Dog Remix -### Love Story (Pop Mix) +### Love Story (Digital Dog Remix) -Love Story - Pop Mix - isMixWithoutTV +Love Story - Digital Dog Remix + isRemixWithoutTV -> Love Story (Taylor’s Version) • Fearless (Taylor's Version) -> Love Story (Taylor’s Version) • Love Story (Taylor’s Version) -> Love Story (Taylor’s Version) • The More Fearless (Taylor’s Version) Chapter @@ -1005,6 +1265,34 @@ Love Story - Pop Mix +### Only The Young (Featured in Miss Americana) + +Only The Young - Featured in Miss Americana + + + + +### Christmas Tree Farm + +Christmas Tree Farm + + + + +### Lover (First Dance Remix) + +Lover - First Dance Remix + + + + +### Lover (Remix) [feat. Shawn Mendes] + +Lover (Remix) [feat. Shawn Mendes] + + + + ### Lover I Forgot That You Existed @@ -1684,6 +1972,61 @@ Ronan +### Die Tribute Von Panem/The Hunger Games: Songs From District 12 And Beyond + +Abraham's Daughter + NO TVs + +Tomorrow Will Be Kinder - from The Hunger Games Soundtrack + NO TVs + +Nothing To Remember + NO TVs + +Safe & Sound - from The Hunger Games Soundtrack + -> Safe & Sound (feat. Joy Williams and John Paul White) (Taylor’s Version) • Safe & Sound (Taylor's Version) + -> Safe & Sound (feat. Joy Williams and John Paul White) (Taylor’s Version) • The More Red (Taylor’s Version) Chapter + +The Ruler And The Killer + NO TVs + +Dark Days + NO TVs + +One Engine - from The Hunger Games Soundtrack + NO TVs + +Daughter's Lament + NO TVs + +Kingdom Come + NO TVs + +Take The Heartland + NO TVs + +Come Away To The Water + NO TVs + +Run Daddy Run + NO TVs + +Rules + NO TVs + +Eyes Open + -> Eyes Open (Taylor's Version) • Eyes Open (Taylor's Version) + -> Eyes Open (Taylor's Version) • The More Red (Taylor’s Version) Chapter + +Lover Is Childlike + NO TVs + +Just A Game + NO TVs + + + + ### Speak Now World Tour Live Sparks Fly - Live/2011 diff --git a/src/Main.tsx b/src/Main.tsx index c4a582f..29dc8d0 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -56,10 +56,15 @@ export default function Main() { trackPlausibleEvent(PlausibleEvent.AuthError, { props: { error } }) } }, []) - - if (spotify) { - return ( - }> + return ( + } + onError={ + /* for some reason, errors are not logged in production */ + e => import.meta.env.PROD && console.error(e) + } + > + {spotify ? ( { spotify.logOut() @@ -70,33 +75,29 @@ export default function Main() { }} spotify={spotify} /> - - ) - } - - return ( - }> - { - trackPlausibleEvent(PlausibleEvent.LoginClick) - try { - setAuthError(null) - const sdk = createSpotifyApi() - const { authenticated } = await sdk.authenticate() - if (authenticated) { - // this should never be reached since authenticate redirects - setSpotify(sdk) + ) : ( + { + trackPlausibleEvent(PlausibleEvent.LoginClick) + try { + setAuthError(null) + const sdk = createSpotifyApi() + const { authenticated } = await sdk.authenticate() + if (authenticated) { + // this should never be reached since authenticate redirects + setSpotify(sdk) + } + } catch (e) { + setAuthError(e.toString() || "") + // @ts-ignore + const error = new Error("Authenticating failed", { cause: e }) + Sentry.captureException(error) + trackPlausibleEvent(PlausibleEvent.AuthFailed) } - } catch (e) { - setAuthError(e.toString() || "") - // @ts-ignore - const error = new Error("Authenticating failed", { cause: e }) - Sentry.captureException(error) - trackPlausibleEvent(PlausibleEvent.AuthFailed) - } - }} - /> + }} + /> + )} ) } diff --git a/src/app/taylorsversions.json b/src/app/taylorsversions.json index be1acba..d8d2ae5 100644 --- a/src/app/taylorsversions.json +++ b/src/app/taylorsversions.json @@ -6,8 +6,8 @@ "5OTddcb28Mkays7lF8hnmf" ] }, - "GBUM70900575": { - "isRemixWithoutTV": true, + "USCJY0803448": { + "isMixWithoutTV": true, "ids": [ "6YvqWjhGD8mB5QXcbcUKtx", "3CeCwYWvdfXbZLXFhBrbnf", @@ -16,8 +16,8 @@ "5RaBeejGtdPEszYEKYECs2" ] }, - "USCJY0803448": { - "isMixWithoutTV": true, + "GBUM70900575": { + "isRemixWithoutTV": true, "ids": [ "6YvqWjhGD8mB5QXcbcUKtx", "3CeCwYWvdfXbZLXFhBrbnf", @@ -389,6 +389,18 @@ "7nWui6jiMM2m9qFmET1Mtj" ] }, + "USUM71120255": { + "ids": [ + "2RJnNdu4pb3MypbBroHU0T", + "6Q237Ts37YGYRIi5Vy5lVX" + ] + }, + "USUM71201814": { + "ids": [ + "2NIBaWXdjaTDmytjjwbEfP", + "0gPmM1WtVRg3uENW3o8bfx" + ] + }, "USCJY1103916": { "isLive": true, "ids": [