Kodi Community Forum

Full Version: Flickering screen when JSON !?..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Setting album details using JSON causes images to flicker

When I call the line below, the images on screen that are album related (cover and fanart) flickers like crazy.

Code:
xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "AudioLibrary.SetAlbumDetails", "params": {"albumid": %d, "rating": %d}, "id": 1 }' % (int(dbid),ratng ) )

Where dbid is a string (passed from the skin). And "ratng" is an int.

I call it from a script, called from a button in a skin.
This was not an issue in the .. erm.. an earlier version of Jarvis.. sorry for not being clearer.

Do any of you have a clue why this happens?
Or alternatively, if there is another/better way to write information to the database?
Or alternatively, if there is any other way to avoid the flickering images (Do they reload?)

Version:
20:29:32 T:5096 NOTICE: Starting Kodi (16.1 Git:20160424-c327c53). Platform: Windows NT x86 32-bit
20:29:32 T:5096 NOTICE: Using Release Kodi x32 build
20:29:32 T:5096 NOTICE: Kodi compiled Apr 24 2016 by MSVC 180040629 for Windows NT x86 32-bit version 6.0 (0x06000000)
20:29:32 T:5096 NOTICE: Running on Windows 7, kernel: Windows NT x86 64-bit version 6.1

Thanks,
I'm assuming that the whole list is being reloaded when the details of the album change. But if at all it should only flicker for a short time.
Is this a new behaviour? I never saw it before. Also, I only use static lists populated by myself so there shouldnt even be link back to the database. It sort of looks like at least the imagecontrols are being forced to do an update though. The imagecontrols have a $INFO [skin.property] as source. Perhaps they are somehow cleared/set?
UPDATE:

It does not matter if it is control type "image" or "large image".
If I remove the <fadetime>. The "error" is not visible. (A fadetime of zero makes the image dissapear, possibly indicating a fadetime bug somewhere?)

Sadly I like the fade between images..
UPDATE:

On some albums it seems to flicker many times, and on some, just a few times.. There seem to be a pattern related to the number of songs on an album, but I am not sure.
If anyone would try to reproduce the error in OP and report back that would be great. Thanks.
Tried this from web browser on Win 10 (because no idea how to run a script from a button on a skin etc.), using Kodi 16.1 and Confluence and did not get much flickering, just one flash on the album cover
Thanks Dave. I count that as a bug confirmation as I believe the reload/flickering is not by design.
So.. I moved all my images out of the "home" window - infact, I never even open the home window now - and whaddayaknow.. no more flickering.

I guess "home" is not a welcome place for me?

Note to self: A custom XML file with the ID set to 1221, is referenced in python using the id 11221.. add more than 9000! Who knew?!
- This is probably a trap planned at The Teams weekly sabotage meetings Wink