I can do everything else it seems, but mysteriously this simple command appears to be missing...
How do I change the order of one or more playlist items in a single command?
EDIT:
I found all the commands handled by the http interface listed in the source file modules/lua/libs/playlist.c, and at the end of that list is a command called 'move' (vlc.playlist.move), linked to a function named vlclua_playlist_move.
Unfortunately in httprequests.luac, the move command appears to be the only command not registered.
However, if I decompile httprequests.luac and edit it, adding the following lines to the processcommands function:
Code: Select all
elseif command == "pl_move" then
vlc.playlist.move(tonumber(_GET['from']),tonumber(_GET['to']))
the command pl_move positions the id 'from' infront of 'to'. If you need to position 'from' as the first item of the playlist, you have to set 'to' to 1, which refers to the playlist node itself...
Although it works functionally, the playlist in the GUI doesn't update to reflect the changes and so it jumps around quite the playlist from item to item. Strange!
If someone could flag this issue with the developers - the lack of a pl_move command in the httprequests.lua and the playlist not updating - I'd be grateful.