2020-12-07, 13:29
Ive been setting up a service addon on my system to do stuff and one of the things it does is present a "Next Up" window for the next episode of whatever show I am watching.
I am therefore generating a list item with the correct information for the next episode to link to this window and am adding the item to the "xbmc.PLAYLIST_VIDEO" playlist and playing it next when the button is clicked or you move to the next episode.
However ive found that on different kodi boxes the "xbmc.PLAYLIST_VIDEO" playlist will not act consistently, on one box I need to clear the playlist every time and start it with an exception when I seek past the end of the episode, as it wont skip to the next episode on its own without this prompting.
On another box it will skip to the next episode fine on its own (no exception generated) without having to clear the playlist and trigger its playback manually, but old items in the playlist start to show the wrong episode information.
And during development where I was clearing the playlist, it would occasionally play the correct next episode but show the information for an item which had been cleared from the playlist before the new item was added.
I had it outputing the exact information for the item I had just populated to the playlist to the logs, and it would still persist in showing information on the OSD and via JSON for an item which no longer exists.
So does anyone know why im getting such inconsistency on the exact same version of kodi on two different systems? Why does one box not play the next item in the playlist without capturing an exception while the other appears to work fine.
Why do old items in the playlist show in the wrong order and with the wrong information?
Why whenever I have set it up to remove the old items (by having my code remember the old filenames, because removing a specific playlist index item is currently not supported by kodi) do items with the filenames I have already removed still appear in the playlist?
What are these ghost items in the playlist?
The xbmc.PLAYLIST_VIDEO playlist cant really be interrogated as far as im aware, so its pretty hard to know whats actually going on.
I am therefore generating a list item with the correct information for the next episode to link to this window and am adding the item to the "xbmc.PLAYLIST_VIDEO" playlist and playing it next when the button is clicked or you move to the next episode.
However ive found that on different kodi boxes the "xbmc.PLAYLIST_VIDEO" playlist will not act consistently, on one box I need to clear the playlist every time and start it with an exception when I seek past the end of the episode, as it wont skip to the next episode on its own without this prompting.
On another box it will skip to the next episode fine on its own (no exception generated) without having to clear the playlist and trigger its playback manually, but old items in the playlist start to show the wrong episode information.
And during development where I was clearing the playlist, it would occasionally play the correct next episode but show the information for an item which had been cleared from the playlist before the new item was added.
I had it outputing the exact information for the item I had just populated to the playlist to the logs, and it would still persist in showing information on the OSD and via JSON for an item which no longer exists.
So does anyone know why im getting such inconsistency on the exact same version of kodi on two different systems? Why does one box not play the next item in the playlist without capturing an exception while the other appears to work fine.
Why do old items in the playlist show in the wrong order and with the wrong information?
Why whenever I have set it up to remove the old items (by having my code remember the old filenames, because removing a specific playlist index item is currently not supported by kodi) do items with the filenames I have already removed still appear in the playlist?
What are these ghost items in the playlist?
The xbmc.PLAYLIST_VIDEO playlist cant really be interrogated as far as im aware, so its pretty hard to know whats actually going on.