Sync podcast state with devices on protocol v4

This client now announces device-sync protocol 4. Podcast operations
are applied to the podcast store, kept in the log and relayed; those
that arrive before the store opens wait in sync_podcast_pending.
Snapshots carry the podcast sections, bounded by the shared limits and
by the line budget of each message, and are merged after the operations.
Operations, snapshot sections and playback state that need v4 are only
sent to peers that reported v4. Periodic progress checkpoints are
coalesced in the log, and the Podcasts tab reloads after changes from
other devices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
sanapachandClaude Opus 5.5 committed 2026-11-19 20:54:16 +02:00
1 parent 4c3edbcd12
commit 79372e00fc
9 files changed
+1281 -45

No files matched your search

+2 -1
View File
@@ -25,6 +25,7 @@ async fn localhost_web_peer() {
library: Arc::new(Library::open(&dir.join("interop-library.sqlite3")).unwrap()),
event_tx: Default::default(),
playback: Default::default(),
podcasts: Default::default(),
};
let id = sync.ensure_identity().unwrap();
let (tx, mut events) = tokio::sync::mpsc::unbounded_channel();
@@ -55,7 +56,7 @@ async fn localhost_web_peer() {
vector: BTreeMap::new(),
ops: vec![],
snapshot: SyncSnapshot::default(),
playback: sync.local_playback_snapshot(),
playback: sync.local_playback_snapshot_for(PROTOCOL_VERSION),
};
let mut bytes = serde_json::to_vec(&hello).unwrap();
bytes.push(b'\n');