I'm trying using the xmbc library to my code on python, exactly y need the method xmbc.getCondVisibility('Player.HasMedia') to know that kodi is treaming a file.
I write their imports but when i run the file, this say: ImportError: No module named xbmc
The code:
Code
import os
import time
import signal
import sys
sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
import subprocess
import socket
import xbmc
import xbmcgui
while True:
if xbmc.getCondVisibility('Player.HasMedia'):
setMovieScene()
sleep(3)
Display More
the source:
python question: how to check when media is playing
List of boolean conditions - Official Kodi Wiki
If I edit line xbmc for kodi, I get this error:
ERROR: AttributeError: 'module' object has no attribute 'getCondVisibility'