|
From: Kevin N. <bea...@ya...> - 2007-01-25 21:40:42
|
Hey Tim, Hopefully you get this and have something to add: I've been working on tjukebox again. I created a PHP web client which works pretty well. There's one thing you might be able to help with. The console client keeps the socket connection open so it constantly recieves updates from the server on the current song. The web client, on the otherhand, get's it's information and closes the socket. I want to try to ensure that the "current song" name is correct. I could do this by forcing the entire page to reload every 10 second, but that's annoying. I know Javascript does not support socket connections, but It can do AJAX. Do you know how we cound harness the AJAX functions to get the current artist, album, and song from the tjukebox server. Also, I want to implement a wait time between playing random songs. Usually at bars if the jukebox is quiet for so many minutes, it'll play a rondom song and sit there for a few minutes again. I have a wait_time parameter in the tjukeboxd.conf file, and the jukebox will currently only play random songs if this flag is set to some value. I was thinking that when the playlist is empty, a new thread could be created to count the wait time. When the timer completes, it will add a random song to the queue. If a song is added to the queue before the timer is done, there will need to be some way to kill the thread. I'm sure it's all easy to do, I just have to learn. If you see any potential problems with this, let me know. Kevin ____________________________________________________________________________________ We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 |