refactor(plex): extract Plex integration into frontend-agnostic qbz-plex crate
Move the Plex LAN client, hand-rolled XML metadata parsing, and the SQLite plex_cache.db logic out of src-tauri/src/plex/mod.rs into a new qbz-plex core crate so it can be shared by every frontend (Tauri, Slint, TUI) per ADR-006. Plex previously lived entirely in src-tauri (~1715 lines), which blocked the Slint Local Library port from shipping Plex. The extraction is mechanical: the module was already almost entirely plain Rust (reqwest + rusqlite + serde + hand-rolled XML). The only Tauri coupling was a dead plex_play_track command bound to AppState (unreferenced; the live path is commands_v2::v2_plex_play_track, which calls plex_resolve_track_media + AppState.player itself). That dead fn and the vestigial #[tauri::command] attributes are dropped. src-tauri/src/plex/mod.rs becomes a `pub use qbz_plex::*;` re-export so every existing crate::plex::* call site compiles unchanged. Full Tauri workspace cargo check stays green; qbz-plex tests pass. cc
This commit is contained in:
7 files changed
+1727
-1714
No files matched your search
@@ -16,6 +16,7 @@ members = [
|
||||
"qbz-cmaf",
|
||||
"qbz-secrets",
|
||||
"qbz-offline-cache",
|
||||
"qbz-plex",
|
||||
"qconnect-core",
|
||||
"qconnect-protocol",
|
||||
"qconnect-transport-ws",
|
||||
|
||||
Reference in new issue
Block a user