Files
pmomusic/pmoaudiocache/Cargo.toml
Claude e06a8d95df Déplacer cache registry dans les crates individuelles (pattern singleton)
Au lieu d'avoir un cache_registry centralisé dans pmoupnp qui créait
des dépendances circulaires, chaque crate a maintenant son propre
singleton global :

- pmoaudiocache : register_audio_cache() + get_audio_cache()
- pmocovers : register_cover_cache() + get_cover_cache()

Changes:
- Add singleton pattern to pmoaudiocache/src/lib.rs
- Add singleton pattern to pmocovers/src/lib.rs
- Add once_cell dependency to both crates
- Update pmoplaylist to use pmoaudiocache::get_audio_cache() as fallback
- Update pmoupnp/upnp_server.rs to use register_* functions
- Update pmoupnp/lib.rs to reexport only get_* (not register_*)
- Remove pmoupnp/src/cache_registry.rs (no longer needed)

pmoupnp réexporte get_audio_cache() et get_cover_cache() pour
compatibilité avec le code existant (pmosource, etc.).
2025-11-05 20:48:52 +00:00

58 lines
1.3 KiB
TOML

[package]
name = "pmoaudiocache"
version = "0.1.0"
edition = "2021"
[dependencies]
# Cache générique
pmocache = { path = "../pmocache" }
# DIDL-Lite pour UPnP
pmodidl = { path = "../pmodidl" }
# Streaming FLAC asynchrone
pmoflac = { path = "../pmoflac" }
pmometadata = { path = "../pmometadata" }
# Base de données
rusqlite = { version = "0.37", features = ["bundled"] }
chrono = "0.4"
# Métadonnées audio
lofty = "0.22"
# Outils de streaming
futures-util = "0.3"
bytes = "1.0"
# Utilitaires
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
quick-xml = { version = "0.37", features = ["serialize"] }
paste = "1.0"
async-trait = "0.1"
# Async
tokio = { version = "1.0", features = ["full"] }
# Singleton
once_cell = "1.20"
# Serveur HTTP (optionnel pour l'extension)
pmoserver = { path = "../pmoserver", optional = true }
pmoconfig = { path = "../pmoconfig", optional = true }
axum = { version = "0.8", optional = true }
utoipa = { version = "5.3", features = ["axum_extras"], optional = true }
tracing = "0.1.41"
[dev-dependencies]
tracing-subscriber = "0.3"
tempfile = "3"
[features]
default = ["pmoserver"]
pmoconfig = ["dep:pmoconfig", "pmocache/pmoconfig"]
pmoserver = ["pmoconfig", "dep:pmoserver", "dep:axum", "dep:utoipa", "pmocache/pmoserver", "pmocache/openapi"]