Jasonra/XBMC-PseudoTV

HTTP API is gone with Frodo

Closed this issue · 4 comments

several calls to executehttpapi are broken in frodo pre-releases. Need to switch to the JSON API.

I'm having the same problem and the following errormessage:

14:27:51 T:2933912672 ERROR: EXCEPTION: Unimplemented method: executehttpapi::executehttpapi(...)
14:27:51 T:2933912672 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.RuntimeError'>
Error Contents: Unimplemented method: executehttpapi::executehttpapi(...)
Traceback (most recent call last):
File "/storage/.xbmc/addons/XBMC-PseudoTV-master/default.py", line 37, in
if xbmc.executehttpapi("GetGuiSetting(1, services.webserver)")[4:] == "False":
RuntimeError: Unimplemented method: executehttpapi::executehttpapi(...)
-->End of Python script error report<--

You can temporarily fix this (and PSEUDOTV on XBMC 12 Frodo) by commenting out this part of the default.py file. Comment or delete the following part:

if xbmc.executehttpapi("GetGuiSetting(1, services.webserver)")[4:] == "False":
try:
forcedserver = REAL_SETTINGS.getSetting("ForcedWebServer") == "True"
except:
forcedserver = False

if forcedserver == False:
dlg = xbmcgui.Dialog()
retval = dlg.yesno('PseudoTV', 'PseudoTV will run more efficiently with the web', 'server enabled. Would you like to turn it on?')
REAL_SETTINGS.setSetting("ForcedWebServer", "True")

if retval:
xbmc.executehttpapi("SetGUISetting(3, services.webserverport, 8152)")
xbmc.executehttpapi("SetGUISetting(1, services.webserver, true)")
dlg.ok('PseudoTV', 'XBMC needs to shutdown in order to apply the', 'changes.')
xbmc.executebuiltin("RestartApp()")
shouldrestart = True

Thanks Teque5, that solution worked for me!

Fixed