fix(Remote playback): kludge to scrub after stream move
This commit is contained in:
@@ -358,6 +358,23 @@ impl PlayerController {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Replace the queue without starting local playback.
|
||||
///
|
||||
/// Used when we're controlling a remote session: the tracks play on the
|
||||
/// remote device, but we keep the local queue in sync so the UI reflects
|
||||
/// what's playing and a later transfer-to-local has the queue to resume.
|
||||
pub fn set_queue(&self, items: Vec<MediaItem>, start_index: usize) -> Result<(), PlayerError> {
|
||||
debug!(
|
||||
"[PlayerController] set_queue (no local playback): {} items, index {}",
|
||||
items.len(),
|
||||
start_index
|
||||
);
|
||||
self.reset_autoplay_count();
|
||||
let mut queue = self.queue.lock_safe();
|
||||
queue.set_queue(items, start_index);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Play/resume playback
|
||||
pub fn play(&self) -> Result<(), PlayerError> {
|
||||
debug!("[PlayerController] play");
|
||||
|
||||
Reference in New Issue
Block a user