If I send a STRM URL over to Kodi via the JSON-RPC API, with the Player.Open method, formatted as documented here, only one video from the playlist is played in Kodi. After the first video ends, the playlist stops.
If I click "play all" on a playlist context menu it works fine and the if-clause is executed.
If I run the JSON-RPC url with the same playlist as parameter, the else-clause is executed and only one video in the playlist plays. Yet the local videos variable holds all the videos in the playlist, which are also added to playlist with playlist.add(). playlist.size() returns the right number. So the playlist doesn't seem to kick in here after a single video is returned. Unfortunately I'm not really into the Kodi sources in order to fix myself.
If I send a STRM URL over to Kodi via the JSON-RPC API, with the Player.Open method, formatted as documented here, only one video from the playlist is played in Kodi. After the first video ends, the playlist stops.
Sample URL:
plugin://plugin.video.youtube/play/?playlist_id=PLlI1lS7MTsOcNDqbuXZLRhief-A_Bgk4L&order=shuffle&play=1
Sample curl cmd:
curl -s --user optionaluser:andpass --data-binary '{"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"plugin://plugin.video.youtube/play/?playlist_id=PLlI1lS7MTsOcNDqbuXZLRhief-A_Bgk4L&order=shuffle&play=1"}}}' -H 'content-type: application/json;' 'http://localhost:8080/jsonrpc'
(Shuffle works in so far it plays a different video each time, but only one video is played)
Edit: Suspecting it has something to do with this if/else clause.
If I click "play all" on a playlist context menu it works fine and the if-clause is executed.
If I run the JSON-RPC url with the same playlist as parameter, the else-clause is executed and only one video in the playlist plays. Yet the local videos variable holds all the videos in the playlist, which are also added to playlist with playlist.add(). playlist.size() returns the right number. So the playlist doesn't seem to kick in here after a single video is returned. Unfortunately I'm not really into the Kodi sources in order to fix myself.
Also, might this be related? https://community.yatse.tv/t/dont-use-player-open-especially-in-case-of-music-plugins/1577 A workaround and how to recognize JSON calls from the add-on (instead of from UI) seems to be mentioned in this thread