Compare commits

...

1 Commits

Author SHA1 Message Date
Connor Johnstone
b39dd6cc8e Added the playlist generator 2026-03-20 18:09:47 -04:00

View File

@@ -1,5 +1,6 @@
use shanty_data::MetadataFetcher;
use shanty_data::MusicBrainzFetcher;
use shanty_data::http::RateLimiter;
use crate::error::SearchResult;
use crate::provider::{
@@ -17,6 +18,13 @@ impl MusicBrainzSearch {
.map_err(|e| crate::error::SearchError::Provider(e.to_string()))?;
Ok(Self { client })
}
/// Create with a shared rate limiter (to coordinate with other MB clients).
pub fn with_limiter(limiter: RateLimiter) -> SearchResult<Self> {
let client = MusicBrainzFetcher::with_limiter(limiter)
.map_err(|e| crate::error::SearchError::Provider(e.to_string()))?;
Ok(Self { client })
}
}
impl SearchProvider for MusicBrainzSearch {