mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #63] ytmusic.upload_song() does not return songid #46
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#46
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 @xplorr on GitHub (Aug 22, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/63
When uploading a new song using ytmusic.upload_song(), the function should return a songid when succeeded.
Now it only returns STATUS_SUCCEEDED but no id, so you cannot add the song to a playlist afterwards.
There is also no reliable function to retrieve the songid from the song just uploaded (YTMusic.search() is not specific enough and unreliable).
There is only ytmusic.get_library_upload_songs(50000) to retrieve all uploaded songs, but this can take long if you have a large library (a few minutes for a library of 20000 songs.
Can you either fix this or create a function to get the songid of the last uploaded song.
Other option is to create a filter in the YTMusic.search() to get the last uploaded song.
@sigma67 commented on GitHub (Aug 22, 2020):
It's not possible to return the videoId due to the way the upload flow works. After you upload a song/video, it is processed asynchronously, as you can see in your uploaded songs tab. I assume the videoId is assigned after processing is finished - or at least it's not available to the client before that.
The upload request itself only returns an empty response, as you can see if you inspect it in the browser.
Sorry if this is not helpful, but it's a limitation of YTMusic itself. Unless we get some sorting options on the uploaded songs list there's no way to just get the most recently uploaded song either.
@xplorr commented on GitHub (Aug 22, 2020):
Thanks! I already suspected this. It's a pity.