Changed is_valid_pk() from sync to async to properly wait for file
creation without blocking. This is a breaking change but we're in
active development.
Changes:
- is_valid_pk() signature: fn -> async fn
- Replaced std:🧵:sleep with tokio::time::sleep
- Updated all 6 call sites in pmoplaylist to add .await:
- WriteHandle::push()
- WriteHandle::push_set()
- ReadHandle::pop()
- ReadHandle::peek()
- ReadHandle::remaining()
- ReadHandle::get_all()
Benefits:
- Non-blocking wait for file creation during ingestion
- More idiomatic async Rust code
- Better integration with tokio runtime
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.).
Fix "PlaylistManager not initialized" error without creating circular
dependency between pmoparadise and pmoupnp.
Changes:
- Add AUDIO_CACHE static to pmoplaylist/manager.rs
- Add register_audio_cache() function to register cache
- Export register_audio_cache from pmoplaylist lib.rs
- Update audio_cache() to check local registry first, then pmoupnp
- Update play_and_cache example to use pmoplaylist::register_audio_cache
- Remove pmoupnp::register_*_cache functions (not needed)
The example now calls pmoplaylist::register_audio_cache() to make
the cache available for pk validation in WriteHandle::push().