-
Notifications
You must be signed in to change notification settings - Fork 46
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
some playlists don't work #152
Comments
@AgutinVBoy can you look into this? |
Wow. The API response for this playlist is different. For a normal playlist, a json is returned with the content: We need to modify the code: fetch information about each track when such format is found. |
Here's a deviant_playlist.json and regular_playlist.json. |
That looks awful |
I took a regular request for a playlist where kind (1023) is passed and user_id (Comicona) got an abbreviated view of the tracks: Then I took and made a request with a combination of all track_id:album_id per request: https://api.music.yandex.net/tracks?trackIds=82876164%2C86356254%2C80782933%2C83291070%2C86726809%2C84019953%2C87706317%2C66781909%2C85740709%2C85815221 - where %2C is a comma (Instead of a bundle, track_id:album_id accepts just an id. But for correctness, it is better to use the first option and everything works correctly for me) And I got the full view of the tracks. Tested on 500+ tracks in the album, it accepts apparently any long list |
Interesting. Thanks for the reply. There are two solutions:
@topi314, take a look at this. What do you think? |
Either will do the job I suppose |
The maximum length of the request (or rather arguments separated by comma) is 6560 characters (I found out experimentally. After that I get error 431). The average track id length is 10 characters (including comma). |
sounds good to me, for safety you could simply check the query length and paginate from there |
I did 500+ and it worked for me. |
When should I wait for the update? |
This issue is up for someone to grab and fix. I personally don't use Yandex and therefore don't really have interest to look into when I'm busy with other stuff. |
can I recompile the plugin with a fix myself, or can I send you an updated file for Yandex and you compile it yourself? |
you can open pr with these changes sure |
https://mega.nz/folder/fy4CgKRT#VuXGCKVatNGTAZ8581pgjw I made a parse of bad playlists in my own way First, he tries to get the tracks in the usual way, if nothing is included in the list, he parses through another link described above. A pack of 300 tracks each. If there are not 300 tracks, then he immediately makes a request for all the IDs I also set the limit of songs on the artist's link to 300, previously there were 10. It is not clear why. If the artist has less than 300 tracks, he will also parse everything correctly |
I'm not gonna download a zip from mega, if you want this fixed open a pull request instead |
I'm not good at github and what to do here. So it's your right to use or not. The main thing is that everything works for me, and the rest is not important |
I made a fork of the project, you can see all the changes |
although now I understand that that If else if check could have been done without checking for the number of tracks. He would have divided the chunks normally if there were less than the specified number. |
then next open a pull request |
check |
I'll take a look later & leave feedback in the pull request |
I will add another text search fix in 2024. Instead of searching only for a track, the most appropriate option will be selected, whether it is a track, playlist or album. I rewrote the logic a bit and slightly fixed erroneous attempts to process json when it did not exist |
Is it still relevant? If so, can I get a couple of links to such playlists? |
There was some sort of misunderstanding on what exactly they wanted |
No, it's no longer relevant. It was fixed in some of the updates |
Meaning with the plugin fix or yandex music api? |
plugin |
not sure what this is supposed to mean |
since this seems to be resolved I am gonna close this issue |
there are playlists that provide shortened track information in the Yandex Music API. I have processed this in my script. In your case, he just doesn't see the tracks.
Playlist: https://music.yandex.ru/users/Comicona/playlists/1023
I did this. Made a request with MarshalX YandexMusic API: https://github.com/MarshalX/yandex-music-api
Copied all the id:album_id from the response to client.user_playlist("kind="1023", user_id="Comicona")
And sent a list consisting of a set of data
id:album_id
On request, client.tracks(list_track)
I received these tracks with full information. I tried it on a playlist with 500+ tracks, everything comes correctly
The text was updated successfully, but these errors were encountered: