Help with a simple addon not working
#1
Hi,

I've got an addon thats stopped working. Its a simple addon to start music party mode and I cant work out what is wrong - no errors are thrown and the kodi.log shows the addon as running successfully.
I can start music party mode manually via the kodi gui and as far as I can tell, everything in the addon code is up to date. Its not working with kodi 19 and 20 on windows. None of the builtin functions work, not even stopping current playback, though I can see the addon is reading settings through some print statements I tested with.

default.py is below, and the whole addon is on giuthub

python:
import xbmc
import xbmcgui
import xbmcaddon
import time

addon = xbmcaddon.Addon(id='script.audio.party.mode.start')
visTimeout = int(addon.getSetting("visTimeout"))
visInfoHide = addon.getSetting("visInfoHide")
visInfoTimeout = int(addon.getSetting("visInfoTimeout"))

def startPartyMode():
    xbmc.executebuiltin("XBMC.PlayerControl(Stop)")
    xbmc.executebuiltin("XBMC.PlayerControl(PartyMode)")
    time.sleep(visTimeout)
    xbmc.executebuiltin("XBMC.Action(Fullscreen)")
    if visInfoHide == 'true':
        time.sleep(visInfoTimeout)
        xbmc.executebuiltin("XBMC.Action(Info)")
        
startPartyMode()

kodi.log


Can anyone tell me why its not running? I'm stumped...
Reply
#2
(2023-02-20, 14:19)teeedubb Wrote: Hi,

I've got an addon thats stopped working. Its a simple addon to start music party mode and I cant work out what is wrong - no errors are thrown and the kodi.log shows the addon as running successfully.
I can start music party mode manually via the kodi gui and as far as I can tell, everything in the addon code is up to date. Its not working with kodi 19 and 20 on windows. None of the builtin functions work, not even stopping current playback, though I can see the addon is reading settings through some print statements I tested with.

default.py is below, and the whole addon is on giuthub

python:
import xbmc
import xbmcgui
import xbmcaddon
import time

addon = xbmcaddon.Addon(id='script.audio.party.mode.start')
visTimeout = int(addon.getSetting("visTimeout"))
visInfoHide = addon.getSetting("visInfoHide")
visInfoTimeout = int(addon.getSetting("visInfoTimeout"))

def startPartyMode():
    xbmc.executebuiltin("XBMC.PlayerControl(Stop)")
    xbmc.executebuiltin("XBMC.PlayerControl(PartyMode)")
    time.sleep(visTimeout)
    xbmc.executebuiltin("XBMC.Action(Fullscreen)")
    if visInfoHide == 'true':
        time.sleep(visInfoTimeout)
        xbmc.executebuiltin("XBMC.Action(Info)")
        
startPartyMode()

kodi.log


Can anyone tell me why its not running? I'm stumped...

I believe you need to remove the XBMC from the commands:

Current

xbmc.executebuiltin("XBMC.PlayerControl(Stop)")


Try this

xbmc.executebuiltin("PlayerControl(Stop)")


I am not 100% sure but I believe this will fix it.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#3
That was it! Thank you very much!
So simple but I overlooked it
Reply
#4
(2023-02-21, 11:21)teeedubb Wrote: That was it! Thank you very much!
So simple but I overlooked it

Glad that fixed it.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply

Logout Mark Read Team Forum Stats Members Help
Help with a simple addon not working0