LaurenceRawlings / savify

Download Spotify songs to mp3 with full metadata and cover art!
MIT License
1.19k stars 80 forks source link

[BUG] Savify downloads random youtube video instead of Spotify track #81

Open Nughu opened 1 year ago

Nughu commented 1 year ago

Describe the bug For some reason, a few specific Songs aren't downloaded from Spotify properly. The song "Taser Tot" by Artist "Rittlin" is completely replaced by some random youtube video about tater tots(???). The command I used:

Savify.exe -o "J:\DJing\Musiq\Album\Rittlin" -g "%album%" https://open.spotify.com/album/3s46ycmfDfc4CgH9qcXNfH?si=ib4seon6TiuHxmFpBT55wQ

To Reproduce Download the album using the command mentioned above.

Expected behavior Every Song in the album is downloaded correctly (without random YT audio)

Desktop (please complete the following information):

Additional context I think this might happen because the Album has the exact same name as the artist.

Nughu commented 1 year ago

I downloaded this Album from Spotify using Savify. In the album directory, I have 2 Songs with similar names: "Shiva Panchakshara Stotram" "Shiva Panchakshari Mantra" both are downloaded, but the second one ("Shiva Panchakshari Mantra") has the exact same audio as the first one("Shiva Panchakshara Stotram"): image

What is this funky business?

joamjoamjoam commented 1 year ago

The way this tool works is it generates a youtube query based of the spotify track information and downloads im assuming the first video for that query. You can use the -vv option to see the search query used for each track and search youtube yourself. The results will probably show your "random" youtube video.

yobonez commented 1 year ago

How is that even possible? I have my own internet radio backend/frontend project and for my recent download i used my 700+ spotify playlist and it looks like about 15-30% of the songs are valid album songs, but misplaced track names / remixes / completely different songs / podcasts even. I don't recall this happening before, because i have a different (older) folder for this project containing about 670 songs that have one difference. I downloaded them by using a bunch of smaller spotify playlists (probably up to 50 songs) and saved them in one folder. And there was maybe like 1 altered song in it.

One of the saved songs from this recently downloaded playlist (BONES - MineralWashed) caught me off guard, because it literally started playing some book being spoken by a lector, and when i checked it, turns out it is 0,6GB in size and is about 10 hours long.

image

When i searched for this song on youtube with a fresh browser session without any cookies or accounts, it literally flooded the page with just the song i searched for. So from where exactly it got this from?

image

joamjoamjoam commented 1 year ago

Im not sure what to tell you except that its open source and you can see some debug information with -vv option. You can even see the youtube download options yourself. Some of the more obscure music dont get the correct info. Ill try it later with that song and see what i see.

Theres a fork of this repo to update to youtube dlp maybe youll like those results more.

Update: for that song i got the same result. The search term shown by -vv is "BONES - MineralWashed audio" i think when you start getting to more obscure music the accuracy is hit or miss. It might be a good idea to add a max length field to prevent download 1gb songs but this repo seems like its unmaintained unfortunately.

joamjoamjoam commented 1 year ago

I made some changes to my fork to make matching more accurate. I pulled a couple of other things, like using yt-dlp since it's more maintained.

Feel free to try it and see if it's better for you. My fork matched BONES -MineralWashed as expected. I also look at the top five matches and choose the best one.

Repo on trent-main branch