fix(meta): store unrated titles as NULL, not zero

TMDB reports vote_average: 0 where no rating exists (#156). Normalise
it to None at the arr-meta edge, like non_empty does for "", and let
the Option flow through the daemon refresh and API add paths so the
nullable columns from #145 do their job.
This commit is contained in:
Miguel Palhas
2026-08-23 22:21:57 +01:00
parent b59e30dbdb
commit 08e3c7bce7
6 changed files with 97 additions and 10 deletions
+3
View File
@@ -217,6 +217,9 @@ async fn unreleased_movie_has_no_dates_and_no_imdb_id() {
assert_eq!(movie.imdb_id, None);
assert_eq!(movie.runtime, None);
assert!(movie.origin_countries.is_empty());
// TMDB reports vote_average: 0 for an unrated title — absence, not zero
// (#156), so it is normalised away like any other zero-valued null.
assert_eq!(movie.vote_average, None);
assert!(!movie.is_digitally_released(date(2026, 8, 22)));
}