Walkyst / lavaplayer-fork

Apache License 2.0
173 stars 68 forks source link

update youtube search param to include video & show exact results #118

Closed topi314 closed 1 year ago

topi314 commented 1 year ago

the old search param EgIQAQ== was used to filter for videos only. the updated also shows exact results only EgIQAUICCAE%253D

you can obtain these by combining various filters & copying the sp query params image

LuiZiffer commented 1 year ago

I have tested this change with my bot. It fixes an issue where a spotify track was not resolved to the correct youtube video.

Walkyst commented 1 year ago

Can you provide that query which show incorrect video?

LuiZiffer commented 1 year ago

https://open.spotify.com/track/0ikz6tENMONtK6qGkOrU3c?si=7fe68bb258c34a5e

Walkyst commented 1 year ago

I mean search query for youtube, not link to spotify

LuiZiffer commented 1 year ago

Ah you mean: "GBBBN0009712"

Walkyst commented 1 year ago

@topi314 For me current parameter EgIQAQ== give only one video what is same as spotify song https://www.youtube.com/results?search_query=GBBBN0009712&sp=EgIQAQ==

LuiZiffer commented 1 year ago

You are missing the "". It should be https://www.youtube.com/results?search_query="GBBBN0009712"&sp=EgIQAQ==

Walkyst commented 1 year ago

Same result

LuiZiffer commented 1 year ago

Screenshot_20230717_175720 This is what I'm seeing in youtube and also what my bot was playing before this change.

topi314 commented 1 year ago

I also get the above result from @LuiZiffer

topi314 commented 1 year ago

https://www.youtube.com/results?search_query=%22GBBBN0009712%22&sp=EgIQAQ%253D%253D image

Walkyst commented 1 year ago

Interesting that youtube give different results for different languages

topi314 commented 1 year ago

anything else we need to get this merged?