How to get "Custom subtitle directory"
#1
Question 
Anyone knows how to get the Configuration > Video > Subtitles > Custom subtitle directory from a Python script/plugin?

Thanks,
Dan
Reply
#2
you need to get it through a http api call. use GetGuiSetting(type; name) with type=string and name=subtitles.custompath
Reply
#3
Thanks Spiff - interesting solution, never came to mind that I could make a HTTP call to XBMC from XBMC Big Grin

I tried it with both

Code:
import xbmc

subtitlesCustomPath = xbmc.executehttpapi('GetGuiSetting(string;subtitles.custompath)').replace("<li>", "")
print subtitlesCustomPath

and accessing through:

http://localhost/xbmcCmds/xbmcHttp?comma...ustompath)

and I got 1953722224... what does the number mean? Not to mention that the webserver has to be enabled...

Maybe a better way would be to make an enhancement request to get these settings through xbmc class?!
Reply
#4
Quote:Not to mention that the webserver has to be enabled...
Not when you make them inside python, that's why they aren't in their own class.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#5
Interesting stuff, thanks rwparris2, that is correct, it works with the webserver off as well.

Still, why am I getting a number instead of the actual path?!
Reply
#6
Code:
int CXbmcHttp::xbmcGUISetting(int numParas, CStdString paras[])
//parameter=type;name(;value)
//type=0->int, 1->bool, 2->float, 3->string
Reply
#7
Thanks Spiff, back in business!!!

Code:
import xbmc

subtitlesCustomPath = xbmc.executehttpapi('GetGuiSetting(3;subtitles.custompath)').replace("<li>", "")
print subtitlesCustomPath

oddly enough I did try a few digits yesterday as the first parameter, without knowing what they meant and it didn't work for me... must be the good night rest Rolleyes

Thanks guys.
Reply

Logout Mark Read Team Forum Stats Members Help
How to get "Custom subtitle directory"0