WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps (/showthread.php?tid=8760)
- Livin - 2006-01-09 00:19
(donno @ dec. 23 2005,06:28 Wrote:good job nad on the httpapi.:bowdown:donno,
why not compile using .net 1.1 so everyone can use it?
many people will not install 2.0 until it has "proven" itself a little longer in the real world.
- TeknoJuce - 2006-01-09 08:53
nad any information on how to play songs individually from a playlist file from the httpapi.. like select a song from the middle of the playlist and start playing it..
- nad - 2006-01-09 22:48
teknojuce: use setplaylistsong(position)
jmarshall: passing a parameter of a file that does not exist to g_applicationmessenger.mediaplay crashes the player. however, you won't be able to test this through the api because i have put a check on the file's existence in the playfile command.
- TeknoJuce - 2006-01-11 08:33
is there anyway to create a playlist and save it throught the httpapi?
i know you can add del and clear so far
also is there any chance to add if its not already there..
Quote:teknojuce: use setplaylistsong(position)setplaylistsong(directory/filename.ext) in playlist..
11-01-2006 01:51:47 debug webs: accept request
11-01-2006 01:51:47 debug httpapi start command: setplaylistsong paras: setplaylistsong; e:\videos\teknovids\ziegelei-wiedereroeffnung-loq.wmv
11-01-2006 01:51:47 debug cplayercorefactor::getplayers(f:\music\trance\dance project - lost and away.mp3)
11-01-2006 01:51:47 info paplayer: end of playback reached
11-01-2006 01:51:47 info mp3codec: loaded decoder at 0095e490
11-01-2006 01:51:48 info pap player: playing f:\music\trance\dance project - lost and away.mp3
i told it to play the video on the list but instead it played the first item on the list.. which was an mp3...
if position is not specified, the position within the current playlist of the currently playing song
!hmm--> or the file name of the song at position position within the current playlist.
- nad - 2006-01-11 20:05
technojuce: setplaylistsong takes an integer parameter which is the position or the required media within the current active play list.
there is an addtoplaylist command.
have you seen the api docs which is on the sourceforge xbmc download page?
you can't create a play list file itself through the api. however, most play list file syntax is very straightforward so you should be able to do this yourself through some client code and then use the api to upload the file, fileupload.
- TeknoJuce - 2006-01-13 09:33
Quote:technojuce: setplaylistsong takes an integer parameter which is the position or the required media within the current active play list.yup i knew that was just asking if you could added a secondary function to it how it says in the apidoc no biggy found away around my problem by specifying the count from my listbox control to = the playlist item number subtracted by 1 cuz apperently playlist start at 0
Quote:there is an addtoplaylist command.ummm yup... quote:i know you can add del and clear so far ...
Quote:have you seen the api docs which is on the sourceforge xbmc download page?i acaully just quoted directly from it in my post
and was pointing out with my:
Quote:!hmm--> or the file name of the song at position position within the current playlist.that it kinda states right there the funtion i was requesting at the time :thumbsup: just that it doesnt acually work...
Quote:you can't create a play list file itself through the api. however, most play list file syntax is very straightforward so you should be able to do this yourself through some client code and then use the api to upload the file, fileupload.thats unfortunate can you atleast make so you can trigger a virtualplaylist or something to that degree ?
anyways awesome job with the httpapi keep it up! :o
- kraqh3d - 2006-01-13 22:12
Quote:is there anyway to create a playlist and save it throught the httpapi?
what do you want to do exactly? do you just want to be able to save a running playlist to the xbox hard drive like "save" button does when at the now playing window?
- Cosworth - 2006-01-15 10:23
i might have missed this over the last 17 pages in the thread, but is this ppc bug known?:
"when a video is running on xbox, xbmccontrol crashes on startup."
i have a trailer python script running on startup, so this happens frequently for me. only way to avoid it (besides the obvious solution to stop the video first) is to press stop in xbmccontrol before it starts "refreshing"
- TeknoJuce - 2006-01-16 13:11
** edit **
sorry!!! i editted your post by accident and my reply overwrote your post.
- kraqh3d - 2006-01-16 15:59
it looks like addtoplaylist will work without an existing playlist if you provide the playlist number as a parameter like this:
this sort of requires knowledge of the xbmc source code, so i'll try to explain... xbmc has four internal playlists:
playlist_music = 0
playlist_music_temp = 1
playlist_video = 2
playlist_video_temp = 3
playlist_music and playlist_video coorespond to whats in the music and video now playing windows. they are visible playlists. users can queue items into them and see what they've queued.
playlist_music_temp and playlist_video_temp are invisible to the user. they are completely internal to xbmc. they are temporary adhoc playlists. this is what's used when you use "play" on a folder in music or video. the items are queued up into the appropiate temp playlist and played. there's one big difference between the two. as soon as the user uses "play" an another folder, the previous temp playlist is deleted and the new items are immediately added.
looking further ar the code, all the playlists related commands take a playlist parameter, but whenever the playlist parameter is missing, it'll default to the current playlist. you could use setcurrentplaylist first.
take a look at the docs. it looks like nad put alot of time into it.
and i'll try to get saveplaylist added in a few days.