macro_rules! library_type_matches_item {
() => { ... };
}Expand description
The Jellyfin taxonomy half of “does cached item i belong to library l”:
the library’s collection_type against the item’s item_type.
A macro rather than a const because both callers need it inside a larger
SQL string literal, and concat! cannot take a const. One definition, so the
two sites cannot drift — they did once already, and opening any downloaded
library then listed every downloaded item on the server (DR-167).
Deliberately has no fall-open arm. Adding “…or the type is unknown”
makes the clause true for every row, which is precisely the defect it exists
to prevent; callers that want that behaviour must say so themselves and
justify it, as LIBRARY_HOLDS_ITEM does.
TRACES: UR-007, UR-055 | DR-167, DR-277