forked from Furumi/furumi-web
Keep the episode position and skip unplayable items safely in the player
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c14ab8dfea
commit
4d0b352258
3 files changed
+152
-11
No files matched your search
@@ -356,12 +356,14 @@ async fn podcast_queue_survives_server_browser_server_round_trip() {
|
||||
let mut incoming = state(queue.clone());
|
||||
incoming.queue_pos = 3;
|
||||
incoming.paused = true;
|
||||
incoming.position_secs = 1200.0;
|
||||
|
||||
// peer -> server -> browser
|
||||
let payload = web_playback_payload(&pool, &incoming).await.unwrap();
|
||||
let tracks = payload["tracks"].as_array().unwrap();
|
||||
assert_eq!(tracks.len(), 4, "no item is dropped");
|
||||
assert_eq!(payload["index"], 3);
|
||||
assert_eq!(payload["position_seconds"], 1200.0);
|
||||
assert_eq!(tracks[0]["source"]["kind"], "podcast_episode");
|
||||
assert_eq!(tracks[0]["unavailable"], true);
|
||||
assert_eq!(tracks[1]["source"]["kind"], "private");
|
||||
@@ -385,6 +387,8 @@ async fn podcast_queue_survives_server_browser_server_round_trip() {
|
||||
assert_eq!(outgoing.queue[..4], queue[..]);
|
||||
assert_eq!(outgoing.queue_pos, 3);
|
||||
assert!(outgoing.paused);
|
||||
// The episode position goes back to the peer (handoff web -> TUI).
|
||||
assert_eq!(outgoing.position_secs, 1200.0);
|
||||
let library = &outgoing.queue[4];
|
||||
assert_eq!(library.id, 77);
|
||||
assert_eq!(library.content_id.as_deref(), Some(CONTENT_ID));
|
||||
|
||||
Reference in new issue
Block a user