2014-07-02, 10:53
I've written an add-on for XBMC (under RaspBMC) that runs at Start-up; the python code checks for the existence of a USB memory stick, and then executes a builtin function. Can I test (in the python script) the result of the builtin function?
My python code line looks like this: xbmc.executebuiltin(PlayMediaCommand)
where the PlayMediaCommand variable looks something like "PlayMedia (myfoldername,isdir)"
When I have media files, they play OK. But how can I find out (in python) whether that actually worked? For instance, if there were no media files in the folder/directory, nothing would play; but how can I check that in python, so that I can then do something else instead?
All help gratefully received.
My python code line looks like this: xbmc.executebuiltin(PlayMediaCommand)
where the PlayMediaCommand variable looks something like "PlayMedia (myfoldername,isdir)"
When I have media files, they play OK. But how can I find out (in python) whether that actually worked? For instance, if there were no media files in the folder/directory, nothing would play; but how can I check that in python, so that I can then do something else instead?
All help gratefully received.