-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Refactor search/provider.py #1150
Conversation
I also dropped getting useless metadata from ytmusic since it is not used anywhere. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure that all CI checks pass. In this case, mypy
is failing.
There are still some things i need to do. At the end I'll make sure the tests pass. |
What is the reason for dropping fuzzy string matching? (Just asking). [EDIT] Results show on YTM but spotDL never gets the correct song - Ytmapi is not recieving the same "display results" from YouTube music. That might affect the result filtering process. You don't have to take that into consideration for this PR, just letting you know. [EDIT 2] |
It really doesn't provide any advantage. The thing is that YouTube's search algorithm is already pretty good at finding stuff, we really don't need to do some hard-core filtering. In my testing the results without fuzzy matching and with fuzzy matching were mostly identical ( though i didn't test much, this needs more Testing ) |
I looked into this. It seems when we have |
Tried that, still doesn't work. |
Well, it worked for me. Btw, i used the non-rapidfuzz version of spotdl. |
Hmmm. What did you change the filters to? I'll check again. |
I removed the filters. But while mapping the song data instead of directly subscrpting, i used '.get()' method. |
Could you share a gist |
|
I think you should check for :
P.S |
Thanks |
It does provide different links for the last 2 cases but provides the same link for the first case, but so does the original spotdl. They're probably the same song |
There aren't the same. It isn't available on YouTube yet though. |
This reverts commit 7cfa274.
Hey @sigma67, could please help us out with this? The changes is this commit cause error on parsing playlists, we would like to get song as well as video results. |
Also, @s1as3r is sigma67/ytmusicapi#121 the same issue you faced when including sung results? |
I'm not sure about the rest of your code, but looks like you're now using default search without a filter. That means you will also get playlist/artist results etc., which do not have duration fields for example. I admit that the docs example is not very good at showing what you get for default search, but essentially the Hope that helps. Edit: Oh and I just saw you're matching Spotify results with YouTube results, I also wrote some code for that purpose for my playlist transfer app. It's a great idea to use song duration for matching, that improved my results a lot as well. The code is here |
This would be the appropriate solution. Would try this out. |
Also keep in mind that YouTube Music Premium subscribers get higher audio quality for |
Used to be part of the old filtering that's getting an over haul rn. |
That change was reverted as it causes error after error when getting playlists and works just fine with individual songs. Which is what we couldn't figure out. |
It's a pretty long thread now so I might have missed something. Was the source of the error within ytmusicapi? If yes can you elaborate what calls were performed (i.e. which search terms or similar)? |
Minor changes (commit refered to below): 7cfa274 So the problem lies with the mentioned commit - it runs a general search, i.e - top result, 3 song results, 3 video results and the rest, the absence of a duration field would explain the errors but there are 2 standouts:
|
There was an issue with unavailable songs in 0.13.1, perhaps it works better with 0.14.0 |
Refactored provider.py