Replace /queues + /bookmarks + /captures with one /crabidy fs provider whose track tomls link into a content-addressed store that de-duplicates audio by provider id and by content hash (architecture/crabidy-store.md). Green-field: no data migration. - crabidy_store.rs: CrabidyStore owns the state tree (state_dir/crabidy) and the data store (data_dir/crabidy); StoreIndex derived from the .cbd-store.toml sidecars. save() enumerates a source into a temp folder and swaps it in atomically (conflict refuses); capture_track dedups (already-stored -> provider-id -> hash -> new). Queue persistence lives here now (persist_current/load_current/save_snapshot/spawn_persister). - capture.rs: reduced to enumerate + Downloader::download_to + Progress; removed the Sink/capture_into/download-to-toml machinery. - orchestrator: one crabidy_client + crabidy_store, single crabidy_owns routing; get_lib_node annotates captured tracks via the store index. - rpc: capture_error_status helper; save_queue link-saves the live queue into /crabidy. playback persists/restores via CrabidyStore. - tidal/youtube set Track.provider_item_id (track id / video id). - cbd-tui: /crabidy/current, captured | row marker, delete confirmation removed (deletes never touch the store), cache-invalidation + help text. - delete bookmark_store/capture_store/queue_store; supersede their docs. See plan/summary.md for deviations (SaveQueue RPC kept; fs id left empty; shallow folder marking). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| config.rs | ||
| lib.rs | ||
| models.rs | ||