How to get XBMC version from Python?
#1
Question 
Hi,

Is there a way to get the XBMC version/build from a Python script/plugin? And possibily the OS name & version. Trying to build a User-Agent string here.

Thanks,
Dan
Reply
#2
httpapi to get builddate & version number. I don't know which is which, this is straight from the wiki. There might be a better way to get this but this is all I know off top of my head:
http://xbox/xbmcCmds/xbmcHttp?command=Ge...fo(120;121)

PHP Code:
import platform
print platform.system(), platform.release() 
this works well on windows, I cannot test linux or macosx or xbox at the moment.

iirc, AMTLite uses some other method (most likely in the download module), I cannot remember what it is though.
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
#3
simplest way is:

Code:
xbmc_version = xbmc.getInfoLabel( "System.BuildVersion" )

example: 9.04-alpha1 r19293

Then you can parse it (string funcs or regex) to extract the bits you need
Retired from Add-on dev
Reply
#4
Thanks guys, much appreciated.

@rwparris2
GetSystemInfo() returns version, build and date, nice.

I found later on the platform package, but for some reason it crashes my XBMC 9.04.1 on Windows XP (CThread:ConfusedtaticThread : Access violation) when calling the any method.

@BigBellyBilly
Thanks BBB - I'm new to InfoLabels, appears you can get quite a bit of information from those (http://www.xbmc.org/wiki/?title=InfoLabels), thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
How to get XBMC version from Python?0