feat(api): expose vanished flag on episodes
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//!
|
||||
//! Refresh is idempotent: over unchanged TMDB data only the stamp moves.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::Arc;
|
||||
|
||||
use arr_core::tracking::{apply_auto_track, apply_tracked, RefreshedSeason};
|
||||
@@ -354,14 +354,14 @@ impl SeriesRefreshAction {
|
||||
known: &HashMap<i64, (i64, String, Option<String>, bool)>,
|
||||
detail: &TmdbSeasonDetail,
|
||||
) -> Result<bool, RefreshError> {
|
||||
let upstream: HashMap<i64, ()> = detail
|
||||
let upstream: HashSet<i64> = detail
|
||||
.episodes
|
||||
.iter()
|
||||
.map(|source| (i64::from(source.number), ()))
|
||||
.map(|source| i64::from(source.number))
|
||||
.collect();
|
||||
let mut changed = false;
|
||||
for (number, &(id, ..)) in known {
|
||||
if upstream.contains_key(number) {
|
||||
if upstream.contains(number) {
|
||||
continue;
|
||||
}
|
||||
let has_file = sqlx::query_scalar!(
|
||||
|
||||
Reference in New Issue
Block a user