mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 23:36:00 +03:00
[GH-ISSUE #8] get_uploaded_songs() fails #7
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @beville on GitHub (Apr 18, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/8
Thanks for this amazing API! I've been uploading my personal music library using the upload_song function, and it's way more convenient than the web UI.
But I've noticed that if I try to run get_uploaded_songs(), I get an error:
Maybe something on the server side changed since you implemented this?
@sigma67 commented on GitHub (Apr 19, 2020):
I'm having no issues with my account, so it should still work provided you have uploaded songs. Could you attempt to debug this and post the API response (l. 610 of ytmusic.py) here?
@beville commented on GitHub (Apr 19, 2020):
I've got probably 1000 songs up so far, and the first one alphabetically has the title "(Am I Just) Fooling Myself"
OK, after these lines:
I added this:
My call is:
Output was rather voluminous:
response.txt
@sigma67 commented on GitHub (Apr 20, 2020):
Thanks, that was quite helpful. It seems that for you the Carousel up top with the "Last played" entries is not being returned with the request. This can be fixed by looking for the 'itemSectionRenderer' entry instead of a fixed index.
Before I push a fix, could you please check if the same issue appears with
get_playlists? It currently uses the same JSON path with a fixed index.@beville commented on GitHub (Apr 21, 2020):
Looks like I do, in fact, get the same error with
get_playlists:@sigma67 commented on GitHub (Apr 21, 2020):
Hey, I've attempted to fix this in
826a72c. Please try the latest version 0.6.1 and reopen if you still have issues.@beville commented on GitHub (Apr 22, 2020):
So, the call to get_playlists now works for me, but when I call get_uploaded_songs, there is now a different error:
@sigma67 commented on GitHub (Apr 22, 2020):
Hey, I think this happened because you had a song processing while you requested your tracks. I'll push a fix shortly.
@beville commented on GitHub (Apr 22, 2020):
OK, I did
sudo pip3 install git+https://github.com/sigma67/ytmusicapi -U, and have the latest from github.The function now succeeds! But oddly, I'm getting 25 results, even though the limit is set to 1. Not really an issue for me, since I was only setting that for test purposes.
[I'll probably post a question in the future as I pursue my goal of generating playlists of shuffled-by-album (picking a list of random albums, and playing each album in order). I implemented this with the gmusicapi, and am looking ahead in case it all gets deprecated.]
@sigma67 commented on GitHub (Apr 22, 2020):
Good point. YoutubeMusic only returns data in 25 increments. Since the API is fetching the data anyway, I thought it may be useful to just return it. It would be trivial though to cut the results to the limit (by subsetting the result list).
Great that you're working with the library, it definitely needs testing from other users. Just to let you know, I'm currently working on the rest of the library functionality. This includes getting library artists and albums, in case you need that for your app.