HTTP API: "PlayFile()" works, but returns error?

If I issue the following HTTP API command:


GET /xbmcCmds/xbmcHttp?command=PlayFile(%2Fusers%2Fmagnus%2Fpublic%2Fmovies%2Fred%20dawn%20%281984%29%2Fvideo_ts%2Fvideo_ts.ifo) HTTP/1.1



I get the following return:

HTTP/1.0 200 OK<br />
Server: GoAhead-Webs<br />
Pragma: no-cache<br />
Cache-control: no-cache<br />
Content-Type: text/html<br />
<br />
<html><br />
<li>Error:Could not play file</html>



Yet, it plays the file fine. Normally I wouldn't care, but aside from curiosity getting the best of me, my program currently parses the return string looking for an "OK" in order to continue logic processing.

Am I doing something wrong here?

Still having this problem… I can’t be the only one?

Nope. I got the same error/response code even though the file played.



Instead of using the PlayFile command, use the built-in PlayMedia command (also via HTTP API but called slightly different) like so.



/xbmcCmds/xbmcHttp?command=ExecBuiltIn&parameter=XBMC.PlayMedia(/Users/htpc/Media/Movies/Cashback.avi)



Doing it this way I got the OK response instead of the "ERROR:Could not play file" response.


Hope this helps.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.