dynamic network loading for omgxxx

This commit is contained in:
Simon
2025-10-04 15:41:24 +00:00
parent 28a4c57616
commit ef625527a2
3 changed files with 224 additions and 67 deletions

View File

@@ -47,6 +47,12 @@ pub static ALL_PROVIDERS: Lazy<HashMap<&'static str, DynProvider>> = Lazy::new(|
m
});
pub fn init_providers_now() {
// Idempotent & thread-safe: runs the Lazy init exactly once.
Lazy::force(&ALL_PROVIDERS);
}
#[async_trait]
pub trait Provider: Send + Sync {
async fn get_videos(