Kodi Community Forum

Full Version: Websocket stops responding when spammed with multiple requests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using Kodi's JSON-RPC API through browser's websocket. For the most part it worked fine, however today I wanted to implement "Mark as watched" for the whole tv show. As far as I see the only way to do it is to send VideoLibrary.SetEpisodeDetails for each episode, however for some reason kodi stops responding after 9 requests. All requests essentially look the same
{"jsonrpc":"2.0", "method":"VideoLibrary.SetEpisodeDetails", "id":15, "params":{"playcount":1, "episodeid":5880}}
the only difference being value of "episodeid". I enabled debug logging and I see first 9 episodes being processed correctly and after that I see:
2019-07-22 22:19:37.888 T:139810161252096    INFO: WebSocket: Frame with invalid length received
2019-07-22 22:19:37.888 T:139810161252096    INFO: WebSocket: Invalid frame received
This looks like a bug in Kodi to me, since I'm using web browser's implementation of websockets, so I don't control frames or their lengths and the same thing happens both in firefox and chrome.