rework domain field
Publish image / publish (push) Failing after 12s

This commit is contained in:
Worph
2026-09-02 00:02:14 +02:00
parent aea258c803
commit 48b0e52146
4 changed files with 358 additions and 70 deletions
+11 -6
View File
@@ -548,7 +548,8 @@ fn build_stub_patch(f: &BTreeMap<String, String>) -> Option<EnrichOutcome> {
set.insert("fileType".to_string(), "video".to_string());
set.insert("videoType".to_string(), "movie".to_string());
set.insert("contentKind".to_string(), "movie".to_string());
set.insert("domain".to_string(), "film".to_string());
set.insert("domain".to_string(), "screen".to_string());
set.insert("workForm".to_string(), "standalone".to_string());
}
if !has_poster {
// Non-resolvable marker — the image 404s (broken tile), but the card
@@ -774,10 +775,13 @@ async fn build_enrichment_patch(
match matched_kind {
TmdbKind::Movie => {
set.insert("contentKind".to_string(), "movie".to_string());
// The routing axis moves with the kind: a TMDB movie match is
// `domain=film`, and reconciling the kind without the domain would
// leave the record routed as a series.
set.insert("domain".to_string(), "film".to_string());
// The routing axes move with the kind. `domain` is `screen` for
// films and serials alike since the merge (METADATA_KEYS.md
// §14.17), so the film-vs-serial half is `workForm` — and
// reconciling the kind without it would leave the record shaped as
// a series.
set.insert("domain".to_string(), "screen".to_string());
set.insert("workForm".to_string(), "standalone".to_string());
// Co-write the narrower `videoType` facet (METADATA_KEYS.md §14.11
// — contentKind=movie ↔ videoType=movie). Overwrites any
// category-derived videoType from `into_discovery_record` with the
@@ -789,7 +793,8 @@ async fn build_enrichment_patch(
}
TmdbKind::Tv => {
set.insert("contentKind".to_string(), "episode".to_string());
set.insert("domain".to_string(), "tv".to_string());
set.insert("domain".to_string(), "screen".to_string());
set.insert("workForm".to_string(), "serial".to_string());
// contentKind=episode ↔ videoType=tvshow (METADATA_KEYS.md §14.11).
set.insert("videoType".to_string(), "tvshow".to_string());
// Season/episode boundary validation. Only a parsed `season`