Basje wrote:Hi there,
I was wondering if there is any possibility to test add-ons (and their Python script) without having an Xbox? I moved to rPi's but would still like to keep my add-on (XBMC Online TV) compatible with XBMC4Xbox.
So is this possible? Perhaps with the Win32 build?
no its give momently no Solution to test a addon for compatible to xbmc4xbox without a xbox self.
But with the integrated python 2.7.5 since not nany thinks what you must do to have a compatible addon for xbmc4xbox.
First you can def a xbox variable for do thinks working differend to mainxbmc!
xbox = xbmc.getCondVisibility("System.Platform.xbox")
then you can easy address this variable for differend solutions for mainxbmc or xbmc4xbox!
as example the pfade on xbmc4xbox and mainxbmc since differend and when you want for your addon a Solution to access a function from your otr a differend addon you can this to over a if else here is a example to access the youtube addon to play a video.
if xbox:
url = "plugin://video/YouTube/?path=/root/video&action=play_video&videoid=" + id
else:
url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + id
But that is not a nice solution better is your def your different pfade example:
def getPluginUrl():
if xbox:
return "plugin://video/"+addon.getAddonInfo('name')
else:
return "plugin://"+addonID
and your access the video over
getPlugin()+"/?path=/root/video&action=play_video&videoid=" + id
and you must not have a look on the addon xml to access the name for the addon self.
Next what since different is:
addon = xbmcaddon.Addon()
works on main xbmc but on xbmc4xbox not we have momently the addon functionality not embed on source .
we access all the functionality over the scriptmodule xbmcaddon and we want for this the addon id to have a luck what for addon it is an emulate than the addon functionality for it
addonID = 'plugin.video.clipfish'
addon = xbmcaddon.Addon(id=addonID) is working on xbmc4xbox and mainxbmc as example.
here working examples what works on mainxbmc and xbmc4xbox:
addonDir = xbmc.translatePath(addon.getAddonInfo('path')) locate the addonDir
addonUserDataFolder = xbmc.translatePath(addon.getAddonInfo('profile')) locate the UserdataFolder
addonfavs=os.path.join(addonUserDataFolder, addonID+".favorites") path for addon favs under userdata
icontest = os.path.join(addonDir, 'icontest.png')
When you want the xbmcvfs on you addon look on the scriptmodule.xbmcfvs what for fuctions since working on it (is a scriptmodule on xbmc4xbox)
when you want the storageserver on your addon pleace add a working storageserver dummy and a try except or if else to access the storageserver ot the storageserverdummy .
the commonplugin cache is a service addon we can not address a service addon so we handle the storageserver over the storageserver dummy
look first on the extern scriptmodules what your want for youre addon.
the requests scriptmodule works on the nightly from xbmc4xbox to and handle all what you can do over the urllib2 module but with simpler code and faster as the urllib2 with unicode support access jason url without import from json and many more.
Regards Jan and have fun