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
23 lines
656 B
TOML
23 lines
656 B
TOML
[package]
|
|
name = "qbz-plex"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Plex LAN-only integration for QBZ: HTTP client, XML metadata parsing, and SQLite cache (frontend-agnostic)"
|
|
|
|
[dependencies]
|
|
# SQLite cache (match the workspace's bundled SQLite usage)
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
|
|
# HTTP client for the Plex Media Server LAN API
|
|
reqwest = { workspace = true }
|
|
|
|
# DTO serialization (camelCase envelopes shared with the frontend)
|
|
serde = { workspace = true }
|
|
|
|
# Platform data dir (plex_cache.db location)
|
|
dirs = "6"
|
|
|
|
# Open the system browser for the Plex PIN auth URL
|
|
open = "5"
|