Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSON-RPC]Fix wrong playback order for smartplaylists, playlists and upnp #13059

Merged
merged 1 commit into from Nov 18, 2017

Conversation

@DaveTBlake
Copy link
Member

commented Nov 17, 2017

Fix long standing bug (since 2011), where queueing playlists (.m3u files etc.), smartplaylists (.xsp) and upnp items using JSON API Playlist.Add() or Playlist.Open() with "directory" parameter results in items in an unexpected and order. The order defined in the smartplaylist, and the actual order of files listed in the .m3u etc. file is ignored.

To test create a smartplaylist with a random order, then queue it using JSON:

[{"jsonrpc": "2.0", "id": 0, "method": "Playlist.Clear", "params": {"playlistid": 0}},
{"jsonrpc":"2.0","id":0,"method":"Playlist.Add","params":{"playlistid":0,
"item":{"recursive":true, "directory":"special://profile/playlists/music/zzzz.xsp"}}},
{"jsonrpc":"2.0","id":0,"method":"Player.Open","params":{"item":{"playlistid":0,"position":1}}}]

Or similar with a .m3u playlist with files in a specific order (other than filename).

The items will always get queued in a filename related order. After this fix actual order of the playlist is used

Some of the many times mentioned on the forum
https://forum.kodi.tv/showthread.php?tid=68263&pid=2490374#pid2490374
https://forum.kodi.tv/showthread.php?tid=68263&pid=2495343#pid2495343
https://forum.kodi.tv/showthread.php?tid=162425

This issue was introduced back in 2011 by d7a095c
This was a fix for https://trac.kodi.tv/ticket/11989 where general files were being queued in revers on some Linux boxes. Hence general files are still sorted by filename to avoid any recurrence of that issue.

JSON version bumped a minor revision (change to internal functionality only)

Fix JSON-RPC Playlist.Add() and Playlist.Open() to queue playlists, s…
…martplaylists and upnp items in correct order

@DaveTBlake DaveTBlake added this to the L 18.0-alpha1 milestone Nov 17, 2017

@MartijnKaijser MartijnKaijser merged commit e00238a into xbmc:master Nov 18, 2017

1 check failed

default Sorry, building this PR failed. Please check the logs for the errors.
Details

@DaveTBlake DaveTBlake deleted the DaveTBlake:JSONPlaylistAdd branch Nov 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.