Open b-risk opened 6 months ago
Yeah the API is very strange; basically instead of calling up the YouTube music website, it calls up the YouTube API which returns the entire website but in JSON format to make it super simple to parse (if you can first get through the mountains and mountains of lists and dictionaries within lists and dictionaries) I haven't figured out yet how to get a personalised home screen. I just used the 'what's trending' part which isn't personalised.
But about what you're saying, could you please clarify? Is it the search API that isn't showing relevant results? That's strange as I thought that was fine... But I could always be wrong, you never know And could you please give me an example? (If it was the search that is not correct, please show me a search query on the actual YouTube music and on Grayjay) So I can better fix this problem and have something to test whether I get it right or not. Thanks!
Oops seems like I forgot about this by accident, so I didn't mean it doesn't show any relevant results but it doesn't show the specific one that YT separates for some reason, let me show a pic for an example: So in this pic you can see that the first result at the top is separated from the rest, in most cases this spot would show the music video only, but for songs without a music video it shows the song itself, like for example this song shows because it is the original version of the song, but I think your source only shows the rest of it, here's a pic of the same search in GJ:
Yeah, I blame the API for that. Maybe the train in getting such a good, free API from Google is because they haven't updated it in ages. There are 2 possibilities on what I could do;
When I have time, I'll look into it
Yeah, I blame the API for that. Maybe the train in getting such a good, free API from Google is because they haven't updated it in ages. There are 2 possibilities on what I could do;
- Look through the API results better to see if they even return that (a quick control-f after we break the code to return the right thing) or if they don't then
- In which case, I could try website parsing. Like, just request the whole website and look for links and text around the links. The grab music API thing still works, no need to change that (for this I mean, maybe one day I could add video support, but that would be very difficult) but we could change the search function
When I have time, I'll look into it
I saw some talk where Futo was saying the use of API in sources is discouraged because of the possibility of being API rate limited, switching to parsing might be time consuming though so maybe this is the best we can get for now until Futo starts working on their own, maybe Jiosaavn (the backend of the seemingly deleted Blackhole project) would better to work on for music unless you could get to work together with Futo
I'll see whether the parsing of the website is slow (because it might not be), if it isn't then I'll use it
If you're still working on the YT Music source (much appreciation BTW), I believe YT Music's algorithm lists the first result as the most relevant result, but the source never seems to display it, which makes searching for specific songs very difficult.