feat: Jellyfin library refresh on import (#93)
ci / web (push) Successful in 28s
e2e / e2e (push) Successful in 55s
ci / rust (push) Successful in 2m12s

This commit was merged in pull request #93.
This commit is contained in:
2026-08-23 01:14:46 +01:00
parent 225be33b55
commit 35391f02fc
3 changed files with 144 additions and 4 deletions
+8 -1
View File
@@ -4,6 +4,7 @@ mod config;
mod grab;
mod import;
mod indexers;
mod jellyfin;
mod reaper;
pub mod reconcile;
mod rss;
@@ -80,6 +81,8 @@ enum Error {
Prowlarr(#[from] arr_indexer::Error),
#[error("transmission client: {0}")]
Transmission(#[from] arr_dl::Error),
#[error("jellyfin client: {0}")]
Jellyfin(#[from] jellyfin::Error),
#[error("bind {addr}: {source}")]
Bind {
addr: std::net::SocketAddr,
@@ -225,11 +228,15 @@ fn reconcile_loop(
),
);
}
let jellyfin = jellyfin::JellyfinClient::new(
config.jellyfin_url.clone(),
config.jellyfin_api_key.clone(),
)?;
// Grab before import, so a download that completes on this tick is
// imported on this tick.
reconcile = reconcile.register(
Tick::Reconcile,
ImportAction::new(transmission.clone(), arr_probe::Prober::new()),
ImportAction::new(transmission.clone(), arr_probe::Prober::new(), jellyfin),
);
Ok(reconcile.register(Tick::Reaper, ReaperAction::new(transmission.clone())))
}