jdf76 / plugin.video.youtube

Kodi's Youtube Plugin -- Please Check the forums before submitting an issue
https://ytaddon.page.link/forum
389 stars 115 forks source link

Only one video of playlist playing when using STRM url over JSON-RPC API #768

Closed JasperE84 closed 4 years ago

JasperE84 commented 4 years ago

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.

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

JasperE84 commented 4 years ago

Edited opening post with sample curl cmd to reproduce, and some more info I found by adding basic logging in the source.

JasperE84 commented 4 years ago

Couldn't let it rest :)

R0nd commented 4 years ago

Seems to reproduce even when starting a playlist from Kodi UI