Files
pmomusic/pmocovers/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

39 lines
918 B
TOML

[package]
name = "pmocovers"
version = "0.1.0"
edition = "2021"
[dependencies]
# Cache générique
pmocache = { path = "../pmocache" }
# Gestion d'images
image = "0.25"
webp = "0.3"
# HTTP client
reqwest = { version = "0.12", features = ["blocking"] }
# Utilitaires
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }
# 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"
[features]
default = ["pmoserver"]
pmoconfig = ["dep:pmoconfig", "pmocache/pmoconfig"]
pmoserver = ["pmoconfig", "dep:pmoserver", "dep:axum", "dep:utoipa", "pmocache/openapi", "pmocache/pmoserver"]