2016-02-28, 15:15
For my addon service.watchedlist, I want to run a script in the settings dialog, that shows an image with a QR-code on the screen (containing a dropbox authorization URL).
Unfortunately, the image is not shown.
I tried the approach from the Notify-addon using json rpc (link to implementation in my code). This worked since there was no other open window in the notify-addon when the image is shown.
The approach with xbmcgui did not work
The error message was
The active modal dialog seems to be the settings dialog of the addon.
Also using window.doModal() did not work.
Using an ok-dialog at the same place did show up.
The issue seems to be discussed as a bug for some time now.
Further Info:
I use Kodi 16.0 and Confluence as skin.
How can I show the image?
Unfortunately, the image is not shown.
I tried the approach from the Notify-addon using json rpc (link to implementation in my code). This worked since there was no other open window in the notify-addon when the image is shown.
Code:
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "Player.Open", "params": { "item": {"file":"' + tmp_file + '"} }, "id": 1}')
The approach with xbmcgui did not work
Code:
window = xbmcgui.Window()
image = xbmcgui.ControlImage(0, 0, 800, 600, tmp_file)
window.addControl(image)
window.show()
xbmc.sleep(4000)
window.close()
The error message was
Quote:13:37:47 T:1912 DEBUG: Activating window ID: 13001
13:37:47 T:1912 INFO: Activate of window '13001' refused because there are active modal dialogs
The active modal dialog seems to be the settings dialog of the addon.
Also using window.doModal() did not work.
Using an ok-dialog at the same place did show up.
Code:
dialog = xbmcgui.Dialog()
dialog.ok('Test1', 'Test2')
The issue seems to be discussed as a bug for some time now.
Further Info:
I use Kodi 16.0 and Confluence as skin.
How can I show the image?