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

fix spotify search? #15

Merged
merged 1 commit into from Aug 6, 2022
Merged

fix spotify search? #15

merged 1 commit into from Aug 6, 2022

Conversation

johan12345
Copy link
Contributor

I am currently trying to copy a playlist from Youtube Music to Spotify and getting no matches for any track in that playlist, even though I know that they exist on Spotify. I noticed that the Spotify search query always includes a formatted output for the AliasedString object such as
track:"value='Some song' aliases=[]"
instead of just the track name 'Some Song (track.name.value). Does the Spotify API actually support this pattern? I couldn't find any example of this in the docs. If I try to just pass track.name.value, as implemented in this PR, I get at least 2 matches for my playlist.

I also noticed that Spotify seems to be very picky about search queries - if a track has multiple artists listed on Spotify, but we only know one of them from YTM, Spotify cannot find it. So maybe the query generator should also generate a query that omits the artist as a fallback?

@platers
Copy link
Owner

platers commented Aug 6, 2022

Thanks for the fix! The tests for searching need great improvement. Thats a good idea on omitting the artist. Theres a lot of low hanging fruit in optimizing the searching. I haven't done much work there because there isn't a principled way to evaluate search yet. I'm happy to take PR's that improve search performance on your tracks for now.

@platers platers merged commit e83064d into platers:master Aug 6, 2022
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.

None yet

2 participants