Page 1 of 1

A Real Jukebox

PostPosted: Fri Oct 31, 2014 7:53 pm
by csobsidian
I've been a subsonic user (and mild contributor) for several years. Despite my insistence that this is one of the best personal media delivery platforms available, I have constantly been annoyed by the lack of "real jukebox" functionality. To that end I have been modifying the server and android app code to accomplish this task. Here is what I am aiming for:

- A single playlist that is shared among multiple users.
- Any user with the jukebox role can queue songs to the end of this playlist.
- Any user with both the jukebox and admin roles can: Remove songs from the playlist, Add songs to the playlist out of order, Clear the playlist, and Start / stop jukebox playback.
- All users should be able to view updates to the playlist in "real" time.
- If the playlist is empty it should auto-play when a song is added.
- Client communications should be as efficient as possible to reduce network and processing overhead.

I've had success implementing all the above features except for having a single jukebox playlist that is shared among all users and I could use some direction from those of you who are more familiar with the server side code base.

My problem essentially boils down to the fact that each user has their own "jukebox" player (if they have the jukebox role). This means that REST calls to jukeboxControl.view with an action of "get" will produce a different result for each user, even though the server itself has a single audio output. Additionally, when calling for changes to the jukebox playlist via REST calls, the server side code forces the jukebox service's player to the player belonging to the currently logged in user (this happens in JukeboxService.updateJukebox()). Where should I look for the best way to force all jukebox users to use a single player? Is there a way to do it in PlayerService.getPlayer() that will easily work everywhere?

Re: A Real Jukebox

PostPosted: Sat Nov 01, 2014 2:14 pm
by csobsidian
Well, it never fails. Spend forever lost in a problem, finally give in and ask for help, and your answer comes to you right away.

I now have a new app built off the most recent subsonic android app and a version of the subsonic server with the changes noted above!