Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-English Spotify URLs will not result in an embedded Spotify player #2357

Closed
tkusano opened this issue Dec 28, 2023 · 1 comment · Fixed by #2424
Closed

Non-English Spotify URLs will not result in an embedded Spotify player #2357

tkusano opened this issue Dec 28, 2023 · 1 comment · Fixed by #2424
Labels
bug Something isn't working x:planned We're on it!

Comments

@tkusano
Copy link
Contributor

tkusano commented Dec 28, 2023

Bluesky can now embed Spotify players, but non-English version links to Spotify albums and tracks will not work as embeded player.

To Reproduce

Samples URLs are attached.

track

album

(If you open a Spotify URL in a language you do not use in your browser, you will be redirected to the Spotify URL in the language you use.)

Cause

In src/lib/strings/embed-player.ts, spotify URL is split by '/' and the second element is treated as type, and expected to be one of 'playlist', 'album' or 'track'.

However, if the second element is in the form of 'intl-LANGCODE', then the third element must be treated as 'type'.

const [_, type, id] = urlp.pathname.split('/')
@haileyok
Copy link
Contributor

Screenshot 2023-12-31 at 2 05 02 AM

Assuming this is correct? Spotify seems to redirect to the non-localized version whenever I try to access it, so I can't actually verify...(doesn't seem the embed takes in the locale either that I can tell)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working x:planned We're on it!
Projects
None yet
3 participants