feat: add async get_container and parallelize source browsing
Introduce an async `get_container` method across source implementations to fetch lightweight container metadata efficiently. Add the `futures` crate as a dependency to enable concurrent operations. Refactor the `browse` flow to short-circuit ephemeral IDs and delegate metadata resolution to `get_container`. Update the RadioFrance handler to scrape episode pages in parallel, bypassing limited RSS feeds and improving overall browsing performance.
This commit is contained in:
@@ -467,6 +467,18 @@ pub trait MusicSource: Debug + Send + Sync {
|
||||
))
|
||||
}
|
||||
|
||||
/// Retourne les métadonnées d'un container (titre, artiste, cover, child_count)
|
||||
/// SANS charger ses enfants — un seul appel API léger.
|
||||
///
|
||||
/// Utilisé par UrlSource pour afficher un album/playlist en résultat de recherche
|
||||
/// avec les bonnes métadonnées et le bon `class` UPnP, avant que l'utilisateur
|
||||
/// ne navigue dedans ou ne lance la lecture.
|
||||
///
|
||||
/// L'implémentation par défaut retourne None (non supporté).
|
||||
async fn get_container(&self, _object_id: &str) -> Result<Option<Container>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
/// Resolve the actual URI for a track
|
||||
///
|
||||
/// This method should return the URI that can be used to stream/download
|
||||
|
||||
Reference in New Issue
Block a user