jsonrpc: force media item refresh after changing an item's details (fixes #13173) #1605

1 commit merged into from Oct 14, 2012

3 participants

Team Kodi member

As already briefly discussed on IRC with @cptspiff and @jmarshallnz this is the hammer approach to fixing http://trac.xbmc.org/ticket/13173. The better approach would be to only update the item that has changed but there are some problems with that. We don't have the original CFileItem object used in the GUI listing that needs to be updated. This can be worked around by retrieving the full "equivalent" CFileItem object from the database but that instance won't have all the additional info that e.g. the CVideoThumbLoader loads in the background of a GUI listing. So updating that item with the newly retrieved one could result in missing artwork or streamdetails or whatever is retrieved asynchronously.

The best approach would be to provide information on which fields/properties/values to update because JSON-RPC know which properties have changed. But that would require quite a bit of extra logic (which I'll try to implement but is most likely out of scope for Frodo).

Team Kodi member

Looks fine for the meantime.

Team Kodi member

@cptspiff This is a fix but I'll wait for your sign-off nonetheless.

@ghost ghost merged commit a2beee4 into xbmc:master Oct 14, 2012

Isn't it a little heavy and shouldn't we send GUI_MSG_UPDATE_ITEM to update single item? Worst case scenario, addon that updates each item's details (f.e. logo downloader) that will update details of f.e. 500 movies (will cause xbmc to 500 times update directory if we happen to be in media window)

Team Kodi member

Please read the discussion in the PR which covers this.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment