WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: WebServer HTTP API (HttpApi): for PocketPC and Web-client Remote Control Apps (/showthread.php?tid=8760) |
- TeknoJuce - 2006-01-13 xnp: -=enlarge=- -=enlarge=- 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 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 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 ** edit ** sorry!!! i editted your post by accident and my reply overwrote your post. - kraqh3d - 2006-01-16 it looks like addtoplaylist will work without an existing playlist if you provide the playlist number as a parameter like this: xbmccmds/xbmchttp?command=additemtoplaylist¶meter=file;playlist 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. http://prdownloads.sourceforge.net/xbmc/apidoc.doc?download and i'll try to get saveplaylist added in a few days. - TeknoJuce - 2006-01-17 okay thanks kraqh3d for the nfo and yes as ive stated before ive used the doc.. only way i would have got as far as i am now if you viewed the screenshot in my above post soooo... ive tried the: xbmccmds/xbmchttp?command=additemtoplaylist¶meter=file;playlist ex xbmccmds/xbmchttp?command=additemtoplaylist¶meter=smb://192.168.1.104/f/music/01-tiesto-just_be_(antillas_club_mix).mp3;1 tried 0 to 3 all came up with error:unknown command so then i tried setcurrentplaylist it said ok but didnt seem to do anything and still wouldnt let me add stuff to a play list then i acidently tried setcurrentplaylist while i had a song going and that apperently starts a playlist with the current song running.. imagine :lol: then i did a bunch more testing and found out the routine you must: 1.) play a song with playfile: ex xbmccmds/xbmchttp?command=playfile¶meter=smb://192.168.1.104/f/music/01-tiesto-just_be_(antillas_club_mix).mp3 2.) add file to playlist: ex xbmccmds/xbmchttp?command=additemtoplaylist¶meter=smb://192.168.1.104/f/music/01-tiesto-just_be_(antillas_club_mix).mp3;1 3.) set the current playlist to 1: ex xbmccmds/xbmchttp?command=setcurrentplaylist¶meter=1 4.) grab the playlist content: ex xbmccmds/xbmchttp?command=getplaylistcontents ^---hopefully this routine is correct if not please post correct order (or if theres an easier way)---^ unfortunatly you cant additemtoplaylist directories cuz you cant play one of the songs in the directory while adding.. so you have to add a single song first to the playlist and then you can add a directory which is kinda tedious :tear: seems to do it now just need that save option :thumbsup: - Drongo - 2006-01-17 nad, i've been using your asp commands and have been trying to pass asp variables into javascript. see the code below:- Quote:<html>basically if i pass variables which are only one line [eg getvolume="<li>69"] then it works fine. when i try and do the same with 'getcurrentlyplaying' the code creates a string but throws up a javascript error. any idea why your multiline functions do this? using the http version of 'getcurrentlyplaying' works fine - its just the asp and spyce versions that are behaving funny. the reason why i can't use the http version is that i can't stop the pda from using the cached page; hence the data does not update on a pda. on a pc you can force the browser to ignore cached pages, but with pocket ie you can't. also have i got the syntax correct for the setresponseformat command as it does not seem to work at all. - kraqh3d - 2006-01-17 techno, i dont know why you would have to do "playfile" before "additemtoplaylist" to get it to work. that makes no sense. yes, "setcurrentplaylist" tells xbmc to start playing that playlist. but i would expect that you should be able to do "getplaylistcontents" regardless of if the playlist is the current playlist or not. i'll check this all out on the weekend. - TeknoJuce - 2006-01-17 alright great stuff kraqh3d yeah i have no clue why a song has to be playing... its only on a freshboot.. if you already have a playlist up then its not needed.. its strange.. just like how the playfile cant play a m3u file on fresh boot but playmedia exteral can.. and playfile can only if you had a playlist loaded before hand ie not fresh boot **edit anyway to get to view inside of rars kinda like how the webface does it 10-01-2004 23:06:28 debug rardirectory::getdirectory() retrieved file: rar://z:\,1,,smb://192.168.1.104/f/z-music/soundtracks/ost - human traffic(1999.128kbps).rar,\ost - human traffic\cd1\ 10-01-2004 23:06:40 debug cplayercorefactor::getplayers(rar://z:\,1,,smb://192.168.1.104/f/z-music/soundtracks/ost - human traffic(1999.128kbps).rar,\ost - human traffic\cd1\02 - cj bolland - it ain't gonna be me.mp3) maybe with getmedialocation & playfile support or something unless this is already there but i think the webface has more access to internal controls then the common commands beacuase i tried with getdirectory no go there? - TeknoJuce - 2006-01-25 kraqh3d did you die on me budday!? - kraqh3d - 2006-01-26 been busy. havent had much time to even visit the forums. rar's and zips are a special case. they are implemented as hidden on-the-fly shares that are added as they are opened and deleted when closed. the current getdirectory function doesnt handle this special case, yet. i'm not sure when i'll have the time to look into it. - TeknoJuce - 2006-01-26 what are you busy doing anything intresting? - kraqh3d - 2006-01-26 life. it takes precedence over this. - TeknoJuce - 2006-01-29 so is there no way for rar browsing/playing being availible to getmedialocation? - kraqh3d - 2006-01-30 not without the code to support it. |