Skip to content

Conversation

@Svagtlys
Copy link

As of Oct 27, 2025, this code is a rough draft of what I'd eventually like to see in Tempus. I would appreciate review of the current features and advice on which, if any, of the to dos would be good to implement.

Current features:

  • Subsonic API implementation for the jukeboxControl endpoint
  • MediaManager updated to allow (janky) calls to the Subsonic API to play music
  • UI elements to play to jukebox added in:
  • Album View Page
  • Playlist View Page
  • Album context menu
  • Song context menu
image

(Potential) To dos:

  • Detect if the server has jukebox mode enabled and whether the logged in user has permission to use jukebox mode, and set the visibility of jukebox mode-related UI elements accordingly
  • Add more UI elements and adjust MediaManager methods as needed (podcasts, radio, "Play Next", "Shuffle" maybe Downloaded songs?)
  • More cleanly controlling the retrofit calls from MediaManager (or wherever they're eventually called from)- currently I'm nesting them based on good response from the previous call as they need to be sequential, but it may be better to set up a separate thread (using ExecutorService?) to handle any closely triggered calls all in sequence, so that a previous button-press doesn't override a more recent one
  • Copy the existing queueing system for media to track and monitor the jukebox, potentially allowing for a "Now Playing" sheet just for the jukebox: this would allow for more natural jukebox control via the bottom sheet, seeing the current song, adjusting the position in the track via slider, skipping forwards and backwards between tracks, and adjusting the position of tracks in the queue

IMPORTANT NOTES:

  • Implemented against a Navidrome server, which uses OpenSubsonic, though OpenSubsonic doesn't currently affect the jukeboxControl endpoint
  • Additionally, I had to use a fork of Navidrome that fixes the jukebox player- deluan's version "plays" music and the jukeboxControl endpoint thinks it is playing music, but somewhere in the line it doesn't actually leave the container (at least for me). Seeing as the endpoints are the same, this should work with deluan's Navidrome for anyone not experiencing jukebox bugs

@Svagtlys Svagtlys changed the base branch from main to development October 27, 2025 14:12
@Svagtlys Svagtlys force-pushed the feat/jukebox-control branch from 3051d8e to e186504 Compare October 27, 2025 14:21
@eddyizm
Copy link
Owner

eddyizm commented Oct 28, 2025

This is really neat. My backend does not support jukebox mode at all, IIRC, so this is going to be a challenge to review or work on myself. I will look a little deeper soon and respond to your comments in detail.

@Svagtlys
Copy link
Author

Sure! I've noticed a dearth of servers that support jukebox mode, and also (Android) apps that support playback to a server that supports jukebox mode, and thought perhaps it's a cyclical thing of "Well, it doesn't exist so why support it?"

That being said, let me know if there's anything I can do to assist :)

@eddyizm
Copy link
Owner

eddyizm commented Nov 7, 2025

I unfortunately have not had time to dig into this, partially because my back end (LMS) does not support the jukebox feature.
Navidrome is one of the most popular one and you mentioned that you had to use a fork to get it working, so generally speaking, like you mentioned, it's not widely supported yet.

I would be interested in knowing what other back ends do support it. I would need a working test server to test and validate.

@Svagtlys
Copy link
Author

Svagtlys commented Nov 9, 2025

Looks like there are a few options; Supysonic, Airsonic, and Gonic all advertise jukebox mode, though looks like only Gonic is currently under development. I use Navidrome personally because of the smart playlists :)

I would definitely agree that jukebox mode isn't widely supported among servers, and don't mind if you would prefer not to integrate any support in Tempus. I will happily keep my fork up to date-ish for as long as I'm using it.

@eddyizm
Copy link
Owner

eddyizm commented Nov 9, 2025

Let's keep it up to date. There is a open issue for LMS for jukebox mode and I would be ok making this a setting if I can test and validate it doesn't cause any major issues when the back end does not support or the setting is disabled.

Would you be open to setting up a temp account on your server?

@Svagtlys
Copy link
Author

My Navidrome server? What's the purpose there?

@Svagtlys Svagtlys force-pushed the feat/jukebox-control branch from e186504 to 19ca2f5 Compare November 15, 2025 09:04
@eddyizm
Copy link
Owner

eddyizm commented Nov 15, 2025

My Navidrome server? What's the purpose there?

I thought you had a server with jukebox support and not navidrome. Sorry! and thanks for keeping the commits coming.

@niawag
Copy link

niawag commented Nov 26, 2025

Hi, I'm a Gonic (server) / DSub2000 (android client) user mainly because of their support of jukebox mode. I've installed Tempus and it's looking great but it's missing my to-go feature: jukebox mode. So I'm willing to help develop this feature if I can be of any use.
Installing Gonic in docker to test the jukebox mode is not a big deal but if you don't want to go that way, I think I can create a temporary user to let you access my gonic server if you'd rather test it this way (but promise not to play music when I'm asleep !)

@eddyizm
Copy link
Owner

eddyizm commented Dec 1, 2025

Hi, I'm a Gonic (server) / DSub2000 (android client) user mainly because of their support of jukebox mode. I've installed Tempus and it's looking great but it's missing my to-go feature: jukebox mode. So I'm willing to help develop this feature if I can be of any use. Installing Gonic in docker to test the jukebox mode is not a big deal but if you don't want to go that way, I think I can create a temporary user to let you access my gonic server if you'd rather test it this way (but promise not to play music when I'm asleep !)

It's really more a function of bandwidth for me. I am trying not to turn away PR's but also want to be able to test a little more thoroughly because in the end, I have work on maintaining it when a bug eventually does arise. Of course, if it is something I or others use, it may get more attention so just taking it a little slow. As is the case, I have noticed many bugs arise from a PR doing one thing, inadvertently disrupting functionality somewhere else in the app which is not caught since we don't have any unit tests and no integration tests either.

I have a few things I am trying to get in bugs/features before I get around to integrating and testing this feature. If you are up for it, I can compile a debug build to test out and run daily, as I mentioned, using the rest of the app would help surface bugs that are not obvious.

@langelgjm
Copy link

I run gonic because until recently Navidrome didn't have multi-library support. gonic doesn't either, but gonic is simple enough that I just run two instances, one for kid's music and one for adult music. Plus, gonic supports jukebox mode, even though Tempo/Tempus does not (yet). For the time being, I use mpd + M.A.L.P. as my jukebox solution, which works well, but it would be great to just use gonic + Tempus. mpd or gonic's jukebox in conjuction with Snapcast provides multi-room synchronized audio, like Sonos but on generic equipment of any kind.

I downloaded and built this PR, installed the APK and ran it against my gonic server. I can see the API calls to jukeboxControl coming through to gonic. I don't actually get sound, but I'm pretty sure that's some issue with gonic and mpv.

I'll see if I can fix my gonic/mpv setup and do some more testing and report back.

@eddyizm
Copy link
Owner

eddyizm commented Dec 3, 2025

Hi @langelgjm !
Thank you for taking the time to do that. Appreciate the help!

@langelgjm
Copy link

I can confirm the Tempus jukebox feature in this PR works with gonic's implementation of jukebox.

In terms of UI / jukebox queue control, rather than a separate play control (and possibly separate queue sheet), what about offering the jukebox as a "output" choice, and just re-using all the normal controls as-is.

E.g. similar to how applications that support casting allow you to either play on your device, or cast to a remote device - you choose a remote output device within the application, and then the application's standard controls now manage playback on the remote device.

Currently this PR lets me play music on the jukebox (remote device), but also play entirely different music on the same device I'm using to control the jukebox, at the same time. I struggle to imagine a scenario where that's useful.

So I can imagine Tempus detecting whether the logged-in user has jukeboxRole, and if so, displaying a little "cast"-like jukebox icon on relevant pages allowing the user to choose where playback occurs - on the jukebox, or on the local device.

@niawag
Copy link

niawag commented Dec 4, 2025

Hi @langelgjm, can you send me the apk so I can test it with my setup ?

@langelgjm
Copy link

@niawag Here's a link where you can download a debug version of the APK that you should be able to install (you'll need to allow installation from unknown sources).

@Svagtlys
Copy link
Author

Svagtlys commented Dec 4, 2025

@langelgjm I was just going for "easiest to do" since I'm not much of an Android coder :) feel free to fork my fork if you want to make that change yourself, but I'm not likely to do it myself soon tbh

I'm quite glad to see that a couple other people are getting some use out of this!

@eddyizm
Copy link
Owner

eddyizm commented Dec 7, 2025

Currently this PR lets me play music on the jukebox (remote device), but also play entirely different music on the same device I'm using to control the jukebox, at the same time. I struggle to imagine a scenario where that's useful.

Thanks for getting testing on this @langelgjm - I think this is a definite change before we bring it in.

I am thinking about adding an option the homepage 3 dot menu, where you get to settings. I am considering that gets expanded for high level changes, for example, for an offline mode:
3DOT > OFFLINE MODE
That would be where we could put an a jukebox mode:
3DOT > JUKEBOX MODE
At that point we could do a quick check to see if the server has the feature enabled and is available or perhaps not even show it?

Also, I 100% agree that it should function like the cast feature and be one with the jukebox server. I have not had a chance to spin up an instance but I am wondering what it looks like, in the api, could there be more than one juke box controller and does jukebox controller A see changes if jukebox controller B adds to the queue or changes the queue? Or is that not a thing. As a solo user I don't have that use case but something we would want to consider if that functionality is there.

As mentioned by the OP, this PR still needs some refinement

Detect if the server has jukebox mode enabled and whether the logged in user has permission to use jukebox mode, and set the visibility of jukebox mode-related UI elements accordingly

@Svagtlys
Copy link
Author

Also, I 100% agree that it should function like the cast feature and be one with the jukebox server. I have not had a chance to spin up an instance but I am wondering what it looks like, in the api, could there be more than one juke box controller and does jukebox controller A see changes if jukebox controller B adds to the queue or changes the queue? Or is that not a thing. As a solo user I don't have that use case but something we would want to consider if that functionality is there.

My understanding and memory of testing is that anyone can see what is currently on the jukebox queue. My implementation had the jukebox handling the queue, so anyone could see what was on next and change that.

For it to function like the cast function, I was planning on implementing queueing on the client side, which would lead to other users not being able to see "what's on next", per se. Again, I'm not an android coder so there may be a way to do it such that it acts like the casting but still allows other users to see the queued playlist.

@niawag
Copy link

niawag commented Dec 11, 2025

Great to see that development is going on this feature !
My testing of the jukebox function seems a bit different than what @Svagtlys describes. Playing an album on the server worked but I had no way of controlling it as the queue and controls are controlling the phone part, not the jukebox (I had to use DSub to stop the jukebox from playing).
I don't know if it's easy to copy as is to this basecode but DSub/DSub2000 implements the jukebox function as described by @eddyizm, the jukebox is considered as a cast device, the queue and controls concerns either the phone or the jukebox. https://github.com/paroj/DSub2000

@Svagtlys
Copy link
Author

@niawag Sorry for the confusion, but the current implementation only allows starting music on the jukebox, or replacing the current queue with something else. There are no controls client-side for actually viewing or manipulating the jukebox queue (you would need to use the subsonic api for that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants