doc:appunti:software:kodi_addon_disable_screensaver
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:software:kodi_addon_disable_screensaver [2023/05/20 17:09] – [How to disable the screensaver into a Kodi add-on] niccolo | doc:appunti:software:kodi_addon_disable_screensaver [2023/05/20 19:28] – [JSON RPC] niccolo | ||
---|---|---|---|
Line 5: | Line 5: | ||
Writing the add-on I faced the problem to disable the screensaver during image playback. It turned out that on the internet you find several examples, which are sometimes confusing and not working. In this page I hope to explain all the possibilities offered by **Kodi 19 Matrix**. | Writing the add-on I faced the problem to disable the screensaver during image playback. It turned out that on the internet you find several examples, which are sometimes confusing and not working. In this page I hope to explain all the possibilities offered by **Kodi 19 Matrix**. | ||
- | ===== JSON RPC ===== | + | ===== Using JSON RPC ===== |
There are several Kodi settings related to the screensaver, | There are several Kodi settings related to the screensaver, | ||
- | Into the add-on code you can use the Python function **xbmc.executeJSONRPC()** to communicate with Kodi itself, using the [[https:// | + | Into the add-on code you can use the Python function **xbmc.executeJSONRPC()** to communicate with Kodi itself, using the [[https:// |
^ powermanagement.displaysoff | ^ powermanagement.displaysoff | ||
^ screensaver.mode | ^ screensaver.mode | ||
^ screensaver.time | ^ screensaver.time | ||
- | ^ screensaver.usedimonpause | + | ^ screensaver.usedimonpause |
<code python> | <code python> | ||
Line 40: | Line 40: | ||
json_rpc = json.loads(xbmc.executeJSONRPC(json.dumps(command))) | json_rpc = json.loads(xbmc.executeJSONRPC(json.dumps(command))) | ||
</ | </ | ||
- | ===== System settings | + | ===== Using a built-in function |
+ | |||
+ | There is another way to disable the screensaver in Kodi: it is a [[https:// | ||
+ | |||
+ | <code python> | ||
+ | # Prevent any screensaver to start. | ||
+ | xbmc.executebuiltin(' | ||
+ | |||
+ | # ... Add-on executes its job... | ||
+ | |||
+ | # Restore the screensaver default behaviour. | ||
+ | xbmc.executebuiltin(' | ||
+ | </ | ||
===== Web References ===== | ===== Web References ===== | ||
Line 47: | Line 59: | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
doc/appunti/software/kodi_addon_disable_screensaver.txt · Last modified: 2023/05/20 19:29 by niccolo