Skip to content

Conversation

@etn406
Copy link

@etn406 etn406 commented May 26, 2024

Spotify URLs can have a country code in them, like this: open.spotify.com/intl-fr/album/<id> (instead of open.spotify.com/album/<id>), but Zotify doesn't handle them yet. Both URLs are working and refere to the same content despite the country code /intl-xx. I couldn't find any official documentation from Spotify about it, and I'm guessing it's added to URLs for accounts localized outside USA. I'm from France and I have it on my browser client, on every page (artists, tracks, etc). While searching about this, I found an issue (fixed) about this on the spotDL repo, and also someone from Deutshland referring to this on Reddit.

I guess it's to make content (un)available per country.

Anyway I added a small part to ignore intl-xx in the Spotify URL RegExp, to be able to just paste URLs for Zotify without manually edit them every time.


I tried out Zotify locally with my modifications and it seems to be working as expected, here for an URL with a country code:

$ zotify https://open.spotify.com/intl-fr/album/1j1yxsmJ81ZfPWOzC5AE5l

###   Downloaded "Jwles - Marches" to "Jwles/Le Zin & les Autres/01 - Jwles - Marches.ogg" in 0s (plus 0s converting)   ###

###   Downloaded "Jwles - 2001" to "Jwles/Le Zin & les Autres/02 - Jwles - 2001.ogg" in 1s (plus 0s converting)   ###

[...]

100%|██████████████▉| 12.0/12.0 [00:16<00:00, 1.36s/Song]


The URLs without country code still work properly too:

$ zotify https://open.spotify.com/track/640NtvlQqMJfFItSl9Zxbu 

Jwles - ahhhh: 100%|██████████████▉| 2.36M/2.36M [00:00<00:00, 4.63MB/s]

###   Downloaded "Jwles - ahhhh" to "Jwles/ahhhh/Jwles - ahhhh.ogg" in 0s (plus 0s converting)   ###

@etn406 etn406 marked this pull request as ready for review May 27, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant