This latest stable version has been pushed to the official Kodi Repo. It has changes required for the latest version of the Emby Server 3.6 and Kodi 18
EmbyCon Beta 1.6
With the latest stable release going live some new experimental features can be pushed to the beta repo.
The 1.6 Beta contains a new caching system that can cache server requests and help speed up browsing larger libraries. This is not a new idea, I had a caching system in a while ago but it just used the URL results, this new system uses a binary cPickle storage system and it is serializing the much more compact ItemInfo class instead of the full JSON object returned form the server so there is much less data and it is much quicker. It is also using a new way of detecting changes and updates so it should not only be faster it should be smarter.
The way it works:
- When you make a request to the Emby server if EmbyCon has not seen that URL before it will grab the data from the server, parse it, build your ListItems and display them (As normal)
- EmbyCon will then serialize the new ListItems using cPickle and save the data to disk in binary format for later use using the MD5 of the "UserId | URL" as the file name
- The next time that user requests the same URL from the server EmbyCon checks if there is a binary cached version on disk, if there is, instead of requesting from the server it will use the saved data
- The binary cPickle data is fast to load
- The loaded data is displayed to the user
At this point the user can see some results
- EmbyCon then in the background checks the server to see if the saved data is actually different
- If the data is different then the new data is saved to the cache and an event is sent to refresh the current list with the new data
This is as simple as it gets in regards to caching, more advanced features could be added including things like max age and dont cache items of type X or dont cache unless there are X items in the results. Also perhaps Item level caching instead of full lists.
As with all caching systems results will vary with different users and library types and sizes. Testing is needed.