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

This commit is contained in:
Worph
2026-09-02 00:02:05 +02:00
parent 1db9704990
commit 32d89e8354
3 changed files with 348 additions and 65 deletions
+7 -2
View File
@@ -200,7 +200,12 @@ pub fn file_type_for_category(category_id: i32) -> &'static str {
pub fn content_kind_for_category(category_id: i32) -> Option<&'static str> {
match category_id / 1000 {
2 => Some("movie"),
5 => Some("tv"),
// ⚠ `episode`, not `tv`. `tv` is not a `contentKind` at all — it was a
// `domain` value, and it isn't even that any more (film + tv merged
// into `screen`, METADATA_KEYS.md §14.17). A kind outside the registry
// vocabulary resolves to no domain and no workForm, so the row is
// stamped with neither and is invisible to every client wall.
5 => Some("episode"),
_ => None,
}
}
@@ -274,7 +279,7 @@ mod tests {
#[test]
fn content_kind_only_where_unambiguous() {
assert_eq!(content_kind_for_category(2040), Some("movie"));
assert_eq!(content_kind_for_category(5040), Some("tv"));
assert_eq!(content_kind_for_category(5040), Some("episode"));
assert_eq!(content_kind_for_category(3010), None);
assert_eq!(content_kind_for_category(7020), None);
}