Launch scripts via webserver
#1
i want to call a python script via an url e.g.
http://xboxip/script.asp?command=....

this would allow for shortcuts to launch mediafile's and open up for integrating more advanced remotecontrol via a pda.

i have successfully launched mediafiles from smb shares via scripts but the server won't recognize python as a script language e.g. <%@ language = python %>

any ideas on how to do this?
Reply
#2
it's already possible
just create a file with a .psp extension and browse to http://spyce.sourceforge.net to see how this works
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
i did try this after your suggestion in the support forum, only it didn't work for me. could be syntax problems though.

i'll give the "hello world" sample from the spyce page a try and we'll see.

i would just like someone to say:
"been there, done that, and here's a .psp file that has worked before".

who knows - that might be me after tonight :o
Reply
#4
ok tried to use the hello world sample from the spyce front page, called via hello.psp from the \web directory. result:

hello print 'world!', (wiki) for i in range(10): { (wiki) =i (wiki) } (wiki)

so the webserver has no idea i'm trying to use spyce here.

again - has anyone made this workHuh?
Reply
#5
ok, it should have worked, it did 4 months ago :d
i'll have a look at it tonight.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
ok, my fault, you should have named the file 'file.spy' Blush
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
i'm just happy it does work! thanks for the help. i'll try and repay with a script or two.

the implementation is a bit funny though. e.g. in spyce you'd write ".import xbmc" but here it only accepts the normal python way of writing "import xbmc". that's why many sample .spy scripts won't work straight from the box.

now - should i call in sick tomorrow and do some coding??  :evil:
Reply
#8
ff and rw would be awesome from a pda. i too use one as a remote control. also, 7 and 30 second skip buttons would be great.

thanks a bunch,
jason.
Reply

Logout Mark Read Team Forum Stats Members Help
Launch scripts via webserver0