Kodi Community Forum
Time for a new or improved WebRemote interface? - 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: Time for a new or improved WebRemote interface? (/showthread.php?tid=18316)

Pages: 1 2 3 4 5 6 7 8 9


- goofygrin - 2006-03-05

ok. i slept a little and made the ui a little more responsive. there is some wierdness though, that when you stop, i have to put a 5 second timer in before you can play again? (the play just doesn't happen). not sure what's going on there.

here's the code (it will replace the old, just so you know):
test-3.zip (unzip, ftp to your /web directory, run http://xboxip/test.html to see all the goodness)

fixed:
- somewhat more responsive ui

new features:
- seek by clicking the progress bar - rad! Smile


- pike - 2006-03-05

due to the massive increase in no # files i put it in a folder. but that didnt work, which seems kinda weird


- Nuka1195 - 2006-03-05

this is really nice.

is there any way to put the mp3 tags in the the playlist box. like song title?

the reason i ask, is when using itunes only the track number itunes assigns is displayed. (720.mp3, 1871.mp3...)


- goofygrin - 2006-03-05

(pike @ mar. 05 2006,19:53 Wrote:due to the massive increase in no # files i put it in a folder. but that didnt work, which seems kinda weird
it's because i use the current url to make a base url for all the ajax requests...  (which is a bug, since i just need the server/port).  i'll fix that.






- goofygrin - 2006-03-05

(nuka1195 @ mar. 05 2006,20:24 Wrote:this is really nice.

is there any way to put the mp3 tags in the the playlist box. like song title?

the reason i ask, is when using itunes only the track number itunes assigns is displayed. (720.mp3, 1871.mp3...)
yes, but it will probably slow down the playlist a lot since i'll have to make a separate call for every item in the playlist. this is something that it would be nice if the interface did (but it doesn't and it would be slow to do on the backend as well i bet? -- i've not taken a look at this code recently enough to know).

if the playlist get's really long, it starts to get unwiedly as well. i was thinking of making it show the last 2 played songs + the next 5ish songs with an option to see the whole playlist. although, a mode like that is one of the reasons i hated slimserver... (i prefer the standard "show everything and mark where i'm at currently).


- goofygrin - 2006-03-06

(goofygrin @ mar. 05 2006,20:36 Wrote:
(pike @ mar. 05 2006,19:53 Wrote:due to the massive increase in no # files i put it in a folder. but that didnt work, which seems kinda weird
it's because i use the current url to make a base url for all the ajax requests...  (which is a bug, since i just need the server/port).  i'll fix that.
quick fix to this issue... won't get the port, but should allow you to use a folder:

test-4.zip


- goofygrin - 2006-03-06

(pike @ mar. 05 2006,19:53 Wrote:due to the massive increase in no # files i put it in a folder. but that didnt work, which seems kinda weird
and just so you don't freak out about the number of files, there's one html, a few images, and .js files for the various pieces of functionality (like in a normal project, where you've got a file for every class, i do too! -- javascript doesn't have to be written like crap!Wink.






- drakethegreat - 2006-03-06

i took the liberty to modify your test4 code. just added a little piece in the playlist javascript file so that it removes file extensions (it accounts for files with more then one period). not quite as nice as id3 tag info but it shouldn't be hard on performance.

test4 with name mod


- goofygrin - 2006-03-06

(drakethegreat @ mar. 06 2006,03:19 Wrote:i took the liberty to modify your test4 code. just added a little piece in the playlist javascript file so that it removes file extensions (it accounts for files with more then one period). not quite as nice as id3 tag info but it shouldn't be hard on performance.

test4 with name mod
i'll do you one better Smile

try this one on for size: test-5.zip

fixed:
- stupid alert on startup with the servername!

added:
- playlist auto-updates to be the artist - song title from the tag in the file (or song title if the tag doesn't have the artist, or leaves the file name if neither artist or title is present)


- goofygrin - 2006-03-06

just a quick heads up, i've got some paying gigs kicking in now, so i might not be quite as quick with updates now Sad


- pike - 2006-03-06

worth noting that after a few of these continual polls:

Quote:06-03-2006 08:11:43 debug webs: accept request
06-03-2006 08:11:43 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:44 debug webs: accept request
06-03-2006 08:11:44 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:45 debug webs: accept request
06-03-2006 08:11:45 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:46 debug webs: accept request
06-03-2006 08:11:46 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:47 debug webs: accept request
06-03-2006 08:11:47 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:47 debug webs: accept request
06-03-2006 08:11:47 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:48 debug webs: accept request
06-03-2006 08:11:49 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying
06-03-2006 08:11:49 debug webs: accept request
06-03-2006 08:11:49 debug httpapi start command: getcurrentlyplaying paras: getcurrentlyplaying

xbmc hogs down completely, if im running a fs viz, it loses 10-15 fps.

second i stop "polling" all return to normal


- [email protected] - 2006-03-06

tahat becase the number of calls needed are loads. n y ive been wrkin on a xml file instead that goofygrin could use


- pike - 2006-03-06

darkie are working on an xml api also, see http://manual.xboxmediacenter.de/wakka.php?wakka=webserverxmlapi


- goofygrin - 2006-03-06

(pike @ mar. 06 2006,07:32 Wrote:worth noting that after a few of these continual polls:

Quote:06-03-2006 08:11:43 debug webs: accept request
06-03-2006 08:11:43 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:44 debug webs: accept request
06-03-2006 08:11:44 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:45 debug webs: accept request
06-03-2006 08:11:45 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:46 debug webs: accept request
06-03-2006 08:11:46 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:47 debug webs: accept request
06-03-2006 08:11:47 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:47 debug webs: accept request
06-03-2006 08:11:47 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:48 debug webs: accept request
06-03-2006 08:11:49 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying
06-03-2006 08:11:49 debug webs: accept request
06-03-2006 08:11:49 debug httpapi start command: getcurrentlyplaying  paras: getcurrentlyplaying

xbmc hogs down completely, if im running a fs viz, it loses 10-15 fps.

second i stop "polling" all return to normal
i need to do the polling if you want a pretty ui that has the elapsed time and the percent complete bar Smile

however, i think that this is a fundamental problem with the "getcurrentlyplaying" api call.  i bet that rather than look at what's in memory and bringing it back (this should be a lightening fast call), it's having to hit the file system for the tag info again, and again, which is causing memory and cpu cycles to be eaten up.  now i've not looked at the code, but i bet that's what's going on.

if i could assume (i hate that word) that the user was not using the xbox interface at all and only using this interface, i could take a lot of the polling out (for the playlist and the currently playing file).  however, that's probably not the best implementation (and i can hear the users screaming already lol).

the xmlapi wiki doesn't make me enthusiastic because the calls don't reflect what a ui will really have to do (plus it doesn't seem like my thoughts/opinions about cdata/xml input were much appreciated -- unless i've got a way to extract a service interface with a simple wrapper [like what vs.net puts around web services], i'll be apprehensive of using it [edit to add, winamp should not be used as an example of a good interface honestly. winamp is a piece of junk software. jmnsho though.]).  i'm not trying to knock the work being done, but an interface should be better thought out to support what it's consumers will be doing/need to do.  to just make an interface without that exploration is wasted work (and we'll probably be in the same boat we're in now).

but, this is your house and your baby, so i'll just step back now and let you guys do what you want to do.






- darkie - 2006-03-06

you should know that i have set that wiki page so that we could discuss some things. it is not finished yet at all, but we can discuss some issues.

Quote:the xmlapi wiki doesn't make me enthusiastic because the calls don't reflect what a ui will really have to do
what part are you talking about here, sending commands to xbmc? that is just some basic idea, and i need some ideas for it.

Quote:plus it doesn't seem like my thoughts/opinions about cdata/xml input were much appreciated -- unless i've got a way to extract a service interface with a simple wrapper
the idea is to create an interface which uses xml in a way it is intended to be used. storing information in attributes is not realy the way it should be done in xml. performance is another thing, it will be a bit slower. but is it really that much slower when parsing in a correct way??
also keep in mind that file names and path names must be! in cdata elements because of special characters they can contain. as far as i know, cdata elements cannot occour in attributes.

something else i had in mind was using xsl sheets. you can for example get the directory contents using the api, apply a xsl sheet over it and get a formatted html table back.