Improve extraction of streamdetails of video items
#1
Right now our logic to extract streamdetails for video items is causing quite a few problems (especially with JSON-RPC and UPnP) and will get worse (or rather become completely broken) when the headless work is progressing. The reason is that we only read/load streamdetails when browsing the library in the GUI and we only load the details for the items that we are currently seeing in the GUI listing. That means that when a user adds a new video source and scans it there will be no streamdetails (and no cached artwork) for the scanned items. If the user now decides to use an android/iOS/whatever remote to control Kodi several data for the newly scanned items are missing or wrong (e.g. the runtime). A similar problem exists when the user lists the video library using a UPnP client. There we have logic to load the details of every listed item but it significantly slows down the response (especially if it first has to extract the streamdetails and cache the artwork).

Basically I can see two/three improvements with advantages and disadvantages:
  1. Extract streamdetails and cache artwork during scanning.
    1. Do it synchronously for every item.This will significantly slow down library scanning, especially for low powered devices.
    2. Do it asynchronously while continuing to scan for more items.This will also slow down library scanning but the library will be filled faster but details won't be available immediately and the overall time the scanning takes will be similar to when doing it synchronously.
  2. Asynchronously extract streamdetails and cache artwork after finishing a scan. That way the actual library scanning will stay as fast as it is and the user will be able to start browsing his library but additional details will only be loaded asynchronously. This might also lead to conflicts if we want to keep the background loading when browsing the library in the GUI leading to two background loaders running simultaneously.

So what is the preferred/best way to improve this? Are there any other approaches that we could take? Do we want to limit the user experience on "powerful" hardware because there are lower power devices that will suffer? Or should we let the user choose when to perform the task?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply


Messages In This Thread
Improve extraction of streamdetails of video items - by Montellese - 2015-04-14, 09:31
Logout Mark Read Team Forum Stats Members Help
Improve extraction of streamdetails of video items0