Files
qbz/crates/qbz-offline-cache/Cargo.toml
T
vicrodh b17bbbd442 feat(offline-cache): move OfflineCacheState + purge into the crate
Completes the crate extraction (Slice 0 backend half):

- state: OfflineCacheState holder (db/fetcher/cache_dir/limit/semaphore/
  library_db + dir-layout helpers + new/init_at/teardown). apply_persisted_limit
  now takes Option<u64> (the caller reads it from offline_settings) instead of
  borrowing src-tauri's OfflineState, so the struct is frontend-agnostic and
  Slint can own one too.
- purge: purge_all_cached_files takes &Mutex<Option<LibraryDatabase>> directly
  instead of src-tauri's LibraryState wrapper.

The crate is now self-contained (13 modules, no Tauri). Next: re-wire the
Tauri commands onto it with an app.emit-backed CacheEventSink and delete the
old src-tauri/src/offline_cache/ module.

cc
2026-05-27 19:50:23 -06:00

39 lines
1.1 KiB
TOML

[package]
name = "qbz-offline-cache"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Offline cache for QBZ: download-for-offline store, CMAF bundle vault, SQLite index, cached playback resolution (frontend-agnostic)"
[dependencies]
# Sibling crates: the network + crypto + init-parse + library index already live here.
qbz-models = { path = "../qbz-models" }
qbz-qobuz = { path = "../qbz-qobuz" }
qbz-cmaf = { path = "../qbz-cmaf" }
qbz-secrets = { path = "../qbz-secrets" }
qbz-library = { path = "../qbz-library" }
# SQLite index (match qbz-library's version/features)
rusqlite = { version = "0.31", features = ["bundled"] }
# Async runtime + HTTP (download pipeline + artwork)
tokio = { workspace = true }
reqwest = { workspace = true }
futures-util = { workspace = true }
# FLAC tag + artwork embedding (legacy-format post-processing)
lofty = "0.23"
# Platform cache dir (default offline-root location)
dirs = "6"
# DTO serialization (camelCase envelopes shared with the frontend)
serde = { workspace = true }
serde_json = { workspace = true }
# Logging
log = { workspace = true }
[dev-dependencies]
tempfile = "3"