Add support for fusing/unfusing JellyLMS zones into synchronized
multi-room groups, addressed by MAC (derived from the `lms-{mac}` device id).
This commit is contained in:
@@ -198,6 +198,12 @@ function createPlaybackModeStore() {
|
||||
// Get repository for handle (backend will fetch playback info via player_play_tracks)
|
||||
const repository = auth.getRepository();
|
||||
|
||||
// Mark the whole sequence as a transfer in the *Rust* manager too. Without
|
||||
// this, player_play_tracks sees mode=Remote and casts the track back to the
|
||||
// remote session instead of playing it locally (the frontend's own
|
||||
// isTransferring flag is invisible to Rust). Cleared in `finally`.
|
||||
await commands.playbackModeSetTransferring(true);
|
||||
|
||||
// Start local playback (events allowed through because isTransferring=true)
|
||||
// Use player_play_tracks - backend fetches all metadata from single ID
|
||||
const repositoryHandle = repository.getHandle();
|
||||
@@ -248,6 +254,14 @@ function createPlaybackModeStore() {
|
||||
console.error("Transfer to local failed:", error);
|
||||
throw error;
|
||||
} finally {
|
||||
// Always lower the Rust transferring flag so it can't stick on if any step
|
||||
// above threw (transfer_to_local lowers it on success, but not if we never
|
||||
// reached it). Safe to call unconditionally.
|
||||
try {
|
||||
await commands.playbackModeSetTransferring(false);
|
||||
} catch (e) {
|
||||
console.warn("[PlaybackMode] Failed to clear transferring flag:", e);
|
||||
}
|
||||
currentTransferAbort = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user