Posts: 696
Joined: Aug 2004
Reputation:
27
Is it possible to get the XBMC version from a plugin? The revision information would be even better (so I can check for something that was fixed/modified in revision XXX)
Posts: 2,710
Joined: Feb 2009
Reputation:
12
ppic
Skilled Python Coder
Posts: 2,710
xbmc_rev = int( xbmc.getInfoLabel( "System.BuildVersion" ).split( " r" )[ -1 ] )
Posts: 696
Joined: Aug 2004
Reputation:
27
seemed on my machine the revision had a "M" at the end of it, so the split/int may not work in all cases?
I've done
rev_re = re.compile(' r(\d+)')
xbmc_rev = int(rev_re.search(xbmc.getInfoLabel( "System.BuildVersion" )).group(1))
i guess a reg exp is perhaps overkill, but it seems to work (and it only gets called once)