You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The edit_playlist() method currently includes ACTION_MOVE_VIDEO_BEFORE, setVideoId, and movedSetVideoIdSuccessor in body["actions"] whenever the moveItem argument is defined. This mirrors the behavior of the YouTube Music client when a title is moved to a position above another one in a playlist.
However, when moving a title to the end of a playlist, the YouTube Music client performs a similar action but omits the movedSetVideoIdSuccessor field.
In order to allow ytmusicapi to do this as well, I suggest changing the edit_playlist() function from:
This way, moveItem can be a Tuple[str,str] (as it is today), as well as a single str or a Tuple[str,], allowing to move a title to the end of the playlist.
The text was updated successfully, but these errors were encountered:
You should definitely be able to move an item to the end, if not I'd consider that a bug.
If I understand this correctly, without this change, you can only move an item A above another item, so it can never be moved directly to the bottom of a playlist. You can do it with two steps, though - by first moving item A to the position above the last item in the list (L), and then moving L above A.
You can create a playlist with a few items and move one to the bottom to see the "action" parameters in the Javascript Console.
Hello, and thanks for the ytmusicapi! :D
The
edit_playlist()
method currently includesACTION_MOVE_VIDEO_BEFORE
,setVideoId
, andmovedSetVideoIdSuccessor
inbody["actions"]
whenever themoveItem
argument is defined. This mirrors the behavior of the YouTube Music client when a title is moved to a position above another one in a playlist.However, when moving a title to the end of a playlist, the YouTube Music client performs a similar action but omits the
movedSetVideoIdSuccessor
field.In order to allow ytmusicapi to do this as well, I suggest changing the
edit_playlist()
function from:to:
This way,
moveItem
can be aTuple[str,str]
(as it is today), as well as a singlestr
or aTuple[str,]
, allowing to move a title to the end of the playlist.The text was updated successfully, but these errors were encountered: