Posts: 26
Joined: Feb 2006
Reputation:
0
2011-05-13, 16:42
Hi,
I'm trying to find a way to change system settings from python.
AFAIK there's no builtin functions for either changing (Video output) Display Mode (for example from FullScreen #1 to Full Screen #2) or Resolution (for example from 1920x1080 to 1024x768).
As these settings can be toggled from the user interface (window systemsettings (WINDOW_SETTINGS_SYSTEM ) ID 10016) I was hoping things could be scripted from python as well.
Any ideas?
TIA
Posts: 2,710
Joined: Feb 2009
Reputation:
12
ppic
Skilled Python Coder
Posts: 2,710
why a script when you can do it in options?
Posts: 26
Joined: Feb 2006
Reputation:
0
Gah...
I'm afraid loading a second profile would cause xbmc to stop playing it's current playlist (right?).
The beauty of switching screens from within the XBMC GUI lies within the fact that it keeps playing (music, video, live tv, ....)
Anyone?
Posts: 566
Joined: Nov 2010
Reputation:
30
So changing settings can be done through the HTTP API...but is there any way to forcefully enable the webserver from a script if it's off? The only ways I can see are both ridiculous: manually modifying guisettings.xml to enable it and then using executebuiltin to restart XBMC (which wouldn't restart the running script), or using the builtin functions to open the settings window with setfocus and sendclick to the proper control to turn it on. Neither are good options.
Posts: 2,368
Joined: Mar 2010
Reputation:
60
giftie
Skilled Python Coder
Posts: 2,368
I always thought that the HTTP API class(through xbmc.executehttpapi() ) was always available to addons even when the webserver is turned off(since addons are 'internal') I know this is how xbmc.executeJSONRPC() works.
Posts: 566
Joined: Nov 2010
Reputation:
30
2011-06-16, 15:47
(This post was last modified: 2011-06-16, 16:26 by Jason102.)
Quite right, executehttpapi does work without the web server enabled. I just tested this and was able to change the web server to on...but only the setting itself...the web server still wasn't accessible until I restarted XBMC. It's odd because before a restart I can go to the system settings and see the tick mark for the server being on, but I still can't access the page itself. Looking at the code this makes sense...it sets the setting but doesn't do anything with it. Any clever tricks I can play to actually turn this on?