spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.8k stars 1.62k forks source link

Different song is being found when getting results using isrc #1341

Closed xnetcat closed 3 years ago

xnetcat commented 3 years ago

Environment


Expected Behaviour

Test should complete

Actual Behaviour

Different song is being found when getting results using isrc

Steps to Reproduce

  1. try to download song that has isrc on youtube

Traceback

https://github.com/spotDL/spotify-downloader/runs/3092321845?check_suite_focus=true


Any other information:

https://discord.com/channels/771628785447337985/771628945455841280/865874655676071936

xnetcat commented 3 years ago

Looks like ytmusicapi is returning some random results even tho we pass correct ISRC. YouTube music is returning correct results so I have no idea what's going on. @sigma67 do you have any idea why is this happening?

image image

Will try to mitigate this by checking song artist and name before returning url

chasep255 commented 3 years ago

I had the same issue this weekend. I ended up removing the isrc search results and just went with the best match search.

xnetcat commented 3 years ago

@chasep255 It's happening only on python3.8 (on ci at least) so it's really weird

chasep255 commented 3 years ago

@chasep255 It's happening only on python3.8 (on ci at least) so it's really weird

I have Python 3.8 on Linux. What is even more strange is that there were some off songs in my dateset a few weeks ago. Couldn't figure out what caused it so I tried to re-download and it worked. But I was trying to add more songs this weekend and the issue started up again.

xnetcat commented 3 years ago

Hmm, looks like other python versions are also getting wrong results image

sigma67 commented 3 years ago

To be honest I'm not sure what's happening here, search is working fine for me. Can you provide some example calls to search for me to reproduce?

chasep255 commented 3 years ago

I am running this on Min Linux 20.1 (Basically Ubuntu 20.04) with the system installed Python-3.8.10. I have spotdl-3.6.3 installed.

I first noticed the error trying to download this playlist... spotdl -of m4a https://open.spotify.com/playlist/37i9dQZF1DX7kWRaihZUiq

For instance this one song has been consistently wrong for me. It is not the only one that is incorrect.

Gathering Spotify Metadata for: https://open.spotify.com/track/081sl4BpdkXcLciOJktR9y Found YouTube URL for "Rihanna, Chew Fu - Russian Roulette - Chew Fu Black Russian Fix" : https://www.youtube.com/watch?v=uUL8a7eJCk8

Another incorrect song from that playlist...

Gathering Spotify Metadata for: https://open.spotify.com/track/7gWSWDBriMK7YKefAe4NMP Found YouTube URL for "Swedish House Mafia, Tinie Tempah - Miami 2 Ibiza - Swedish House Mafia vs. Tinie Tempah" : https://www.youtube.com/watch?v=ed1Qmchevd4

I also would add that it does not consistently pick the same incorrect song. I reran spotdl for the Rihanna song above and got a different youtube video.

spotdl -of m4a https://open.spotify.com/track/081sl4BpdkXcLciOJktR9y Fetching Song... Gathering Spotify Metadata for: https://open.spotify.com/track/081sl4BpdkXcLciOJktR9y Found YouTube URL for "Rihanna, Chew Fu - Russian Roulette - Chew Fu Black Russian Fix" : https://www.youtube.com/watch?v=wSU0mya4sFE

xnetcat commented 3 years ago

@sigma67 So basically searching using isrc would return random result

image

Can't reproduce this on my local machine but it keeps happening on ci here and here. Also some users reported wrong results

sigma67 commented 3 years ago

Since it's not happening consistently, I see two options:

I had a look at the requests on the web interface again to see if anything changed, but it doesn't look like it. Is it more consistent if you're not using the songs filter?

chasep255 commented 3 years ago

I used my VPN to connect from California (I ran all previous tests from the New York City area without a VPN.) I still see the same issue. Then I connected to a Canadian VPN server and all the results are correct.

sigma67 commented 3 years ago

US is usually the first region to receive new updates, so it may very well be a US update rollout.

xnetcat commented 3 years ago

fixed in v3.7.0 - #1339