Posts: 45
Joined: Jun 2008
Reputation:
0
KeithB
Junior Member
Posts: 45
Having recently switched from using a combination of MythTV and MPlayer to standalone XBMC, there is one item left I'm wondering if it's possible to do.
As well as media playback, the PC does a fair bit of content downloading. As part of the config, the downloader has a custom ksh script it runs when it's finished to check if it can switch the PC off. The previous config was simple - if mplayer (among other things) was running then don't switch off.
Is there any way of doing this or similar with XBMC?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
You could do a request to the built-in webserver to evaluate the boolean condition Player.IsPlaying - is that what you're after?
Posts: 45
Joined: Jun 2008
Reputation:
0
KeithB
Junior Member
Posts: 45
On the basis the python engine is fubar for now, ruling out the IsPlaying option, are there any other possibilities for this one?
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
If it would be helpful, a very simple isplaying command could be added to the HTTPAPI.
Posts: 4,997
Joined: May 2004
Reputation:
12
getcurrentlyplaying returns something like "<html><li>[Nothing Playing]</html>" if there's nothing going on. Doesn't really seem like there's a need for a new command IMO.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
go for it. there's tons of info available. but, if you didn't know, the lcd display is crudely skinnable via the lcd.xml file. (does the linux version even supports the lcd out of the box?)
and if you're going to this work, why not build it into xbmc?
Posts: 45
Joined: Jun 2008
Reputation:
0
KeithB
Junior Member
Posts: 45
The Linux port of XBMC supports LCDProc which is (AFAIK) is about as close to a standard interface as you'll get on Linux. (Or at least the most likely to have been patched to support the hardware).
I did take a look at the lcd.xml file and while it does provide a way of dumping the same information on the screen, it's just the formatting I'm not convinced about. (Having a progress bar that's bigger than the display that scrolls back and forth for example).
Short term, I know I can script it fairly quickly into the customisations I have on the box (I was already using a PERL script to drive something similar when using Myth & MPlayer to do the job now done by XBMC). Not sure if that's something that would benefit XBMC though.
Long term, I'll probably look at tweaking the LCD handling of XBMC itself though (always preferrable to simplify the overall implementation of the system) which I could drop back into the mainstream if people want it.
Posts: 2
Joined: Aug 2008
Reputation:
0
I just installed the linux port a few days ago and have some quick questions about using the HTTPAPI. Sorry if this thread wasn't meant to answer these types of questions, but it seems like you've got it working pretty well.
When I send commands from the HTTPAPI to xbox XBMC with a browser, it works perfectly, but when I send commands to the computer with the linux port XBMC, my browser is unable to establish a connection. Are you sending commands through a browser? Do you just use the computer's IP?
I have Web Server Enabled and have tried the default Web Server Port 8080 and Port 1024. I have enabled remote events and receive events from other computers. Is there anything I need to set up before using commands from the HTTPAPI?
Posts: 4,997
Joined: May 2004
Reputation:
12
The webserver may have been broken when alpha3 was released. It's been fixed since and a new alpha is scheduled soon.