Playlist.Add alphabetical order only ? (Workaround and python skript for testing) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: Playlist.Add alphabetical order only ? (Workaround and python skript for testing) (/showthread.php?tid=167987) |
Playlist.Add alphabetical order only ? (Workaround and python skript for testing) - roscoe - 2013-06-27 Hi, I think I am overlooking something, but I just cant add audio playlists in the right order, they always come out in alphabetical order. they are in correct order if I do this: {"jsonrpc":"2.0","id":1,"method":"Files.GetDirectory","params":{"directory":"/home/pat/3TB/_music_/test/test.m3u"}} when I add them: {"id":1,"jsonrpc":"2.0","method":"Playlist.Add","params":{"item":{"directory":"/home/pat/3TB/_music_/test.m3u"},"playlistid":0}} they will be in alphabetical order / filename order / not in the original order. if I add the playlist in xbmc via "Q" key everything is fine .... is there a parameter in Playlist.Add which disbles this sorting ? If not, are there plans to change it ? btw I am on 12.2 Git32b1a5e May 2 2013 (xbmcbuntu) RE: Playlist.Add alphabetical order only ? - roscoe - 2013-07-01 well, I found a way to add playlists remotely in the right order and play it @Montellese: Can you confirm that Playlist.Add only works in alphabetically order ? (see above...) just can't believe it... but if it is so, here's my python script to add them one by one in the right order: - json-rpc function was taken from somewhere in this forum - adding 60 songs take about 20secs ... I will look into batch-sending Code: # TODO: batch upload RE: Playlist.Add alphabetical order only ? - Tolriq - 2013-07-01 Be careful as stated by topfs batch commands are not order constrained. So if you batch you may end up with songs in wrong order in any future Xbmc patch RE:Playlist.Add alphabetical order only ? (Workaround and python skript for testing) - roscoe - 2013-07-02 edited a typo ... should work now except KeyError instead of except (KeyError ) and added play function |