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> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
tidaldy — the Tidal provider
Mounts your Tidal account at /tidal in the crabidy library, using
Tidal's web API.
How it works
On first start the provider runs Tidal's OAuth device login: the
server prints a link.tidal.com verification URL to its stdout (for
cbd, check the log file) — open it in a browser, authorize, and the
provider finishes logging in by itself. The obtained tokens are written
back into the config file and refreshed automatically from then on; you
should not need to log in again.
The tree offers your playlists, favorite artists (with their albums and
tracks), and a search node: press % under /tidal/search to
create a search term; the term becomes a persistent child node holding
its results (tracks, artists, albums). Terms are renamable (e,
re-runs the search) and deletable (d).
Everything queueable is also capturable: w bookmarks a subtree as
links, W downloads a subtree's audio into /captures/<name>.
Configuration — ~/.config/crabidy/tidaly.toml
The file is rewritten on every server start with the current values (including refreshed tokens), so it contains your credentials — keep it private. All options with their defaults:
# Tidal API endpoints. Change only if you know why.
base_url = "https://api.tidal.com/v1"
hifi_url = "https://api.tidalhifi.com/v1"
# Stream quality: "Low" | "High" | "Lossless" | "HiRes".
audio_quality = "Lossless"
# Managed by the provider: filled in by the device login and refreshed
# automatically. Delete this whole section to force a fresh login.
[login]
# device_code = ...
# user_id = ...
# country_code = ...
# access_token = ...
# refresh_token = ...
# expires_after = ...
# OAuth client identity used for the device flow. Working defaults are
# built in; override only to use your own client registration.
[oauth]
# client_id = ...
# client_secret = ...
base_url = "https://auth.tidal.com/v1/oauth2"
Notes:
- A missing or empty file is fine: defaults are used and the device login runs on the next start.
- If Tidal ever invalidates the session (long offline periods), delete
the
[login]section and restart.