sigma67 / spotify_to_ytmusic

Clone a Spotify playlist to YouTube Music
MIT License
790 stars 65 forks source link

What is the algorithm to match songs? #99

Closed aneesh1122 closed 1 month ago

aneesh1122 commented 1 month ago

when This song is being added I expected this song to be added in my playlist but this song is being added.

The song which I expected to be added is the 1st song that comes when searching for "Title + Artists"

sigma67 commented 1 month ago

You can check it here.

https://github.com/sigma67/spotify_to_ytmusic/blob/master/spotify_to_ytmusic/utils/match.py#L4

It's a mix of comparing titles of both songs and durations, heavily weighted towards durations.

Your case is a bit suprising tbh, I expect both matches to be quite close to each other in the actual scores. Feel free to debug & check.

aneesh1122 commented 1 month ago

Feel free to debug & check

How to do that? Sorry, I'm a noob when it comes to coding 😅