2021-10-23, 08:16
Hello Kodi community! I'm starting to learn how to develop add-ons via the Kodi wiki tutorials, but I've run into an issue that I'm struggling to figure out. I have modified the hello world tutorial add-on so addon.py has:
The rest of the code is identical to the official repository. However, once I started a video in Kodi, I got the error in the log that's on line 593 in this paste bin. Since I imported xbmc in the first line of my python script, how can 'xmbc' not be defined? I've been searching around the forums to help with troubleshooting this, but I haven't found anything yet. I'm guessing I made a syntax mistake, but I'm not sure. Any insights would be greatly appreciated!python:import xbmc
import xbmcaddon
import xbmcgui
monitor = xbmc.Monitor()
while not monitor.abortRequested():
if xbmc.Player().isPlaying():
xmbc.sleep(1000)
try:
playTime = xbmc.Player().getTime()
print(playTime)
except:pass