-
-
Save romanr/ed0ddc12e9f1955d2742c0376d9ad6d2 to your computer and use it in GitHub Desktop.
Kodi - Auto hide Video OSD (On Screen Display)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<addon id="service.autoexec" name="Autoexec Service" version="1.0.0" provider-name="your username"> | |
<requires> | |
<import addon="xbmc.python" version="3.0.0"/> | |
</requires> | |
<extension point="xbmc.service" library="autoexec.py"> | |
</extension> | |
<extension point="xbmc.addon.metadata"> | |
<summary lang="en_GB">Automatically run python code when Kodi starts.</summary> | |
<description lang="en_GB">The Autoexec Service will automatically be run on Kodi startup.</description> | |
<platform>all</platform> | |
<license>GNU GENERAL PUBLIC LICENSE Version 2</license> | |
</extension> | |
</addon> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# old way: /Internal shared storage/Android/data/org.xbmc.kodi/files/.kodi/userdata | |
# matrix: /Internal shared storage/Android/data/org.xbmc.kodi/files/.kodi/addons/service.autoexec/{autoexec.py,addon.xml} | |
import xbmc | |
import threading | |
def log(msg, loglevel=xbmc.LOGDEBUG): | |
xbmc.log("[autoexec.py] --> %s" % msg, level=loglevel) | |
def check_osd(): | |
while True: | |
if xbmc.getCondVisibility("System.IdleTime(5)"): | |
if xbmc.getCondVisibility("Window.IsActive(videoosd)"): | |
xbmc.executebuiltin("Dialog.Close(videoosd)") | |
xbmc.sleep(500) | |
log("starting autoexec") | |
threading.Thread(target=check_osd).start() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment