Re-organized providers and added a few
This commit is contained in:
@@ -5,9 +5,10 @@ use clap::Parser;
|
||||
use tracing_actix_web::TracingLogger;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
use shanty_data::MusicBrainzFetcher;
|
||||
use shanty_data::WikipediaFetcher;
|
||||
use shanty_db::Database;
|
||||
use shanty_search::MusicBrainzSearch;
|
||||
use shanty_tag::MusicBrainzClient;
|
||||
|
||||
use shanty_web::config::AppConfig;
|
||||
use shanty_web::routes;
|
||||
@@ -53,8 +54,9 @@ async fn main() -> anyhow::Result<()> {
|
||||
tracing::info!(url = %config.database_url, "connecting to database");
|
||||
let db = Database::new(&config.database_url).await?;
|
||||
|
||||
let mb_client = MusicBrainzClient::new()?;
|
||||
let mb_client = MusicBrainzFetcher::new()?;
|
||||
let search = MusicBrainzSearch::new()?;
|
||||
let wiki_fetcher = WikipediaFetcher::new()?;
|
||||
|
||||
let bind = format!("{}:{}", config.web.bind, config.web.port);
|
||||
tracing::info!(bind = %bind, "starting server");
|
||||
@@ -64,6 +66,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
db,
|
||||
mb_client,
|
||||
search,
|
||||
wiki_fetcher,
|
||||
config: std::sync::Arc::new(tokio::sync::RwLock::new(config)),
|
||||
config_path,
|
||||
tasks: TaskManager::new(),
|
||||
|
||||
Reference in New Issue
Block a user