Search and detail lookup, carrying the two fields the policy engine needs and that are easy to lose at the edge. `original_language` arrives as bare ISO 639-1, which has one code for both Portuguese variants, so the dub rule in §5.2 cannot be expressed against it alone. `Movie` therefore also carries `origin_countries`, from `origin_country` where TMDB has it and `production_countries` otherwise, which is what separates a Brazilian film from a Portuguese one. Digital release dates come back appended to the detail call rather than costing a second round trip, reduced to the earliest type-4 entry across every country: a release existing in one region is a release that exists on the indexers. `Movie::is_digitally_released` puts the §6.2 gate in one tested place. Responses are cached in process for a day, matching the metadata refresh tick. Failures are never cached, so an outage cannot pin a title into a bad state until tomorrow. Tests are wiremock-backed, per §12.
23 lines
410 B
TOML
23 lines
410 B
TOML
[package]
|
|
name = "arr-meta"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish = false
|
|
|
|
[dependencies]
|
|
chrono.workspace = true
|
|
reqwest.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
tracing.workspace = true
|
|
|
|
[dev-dependencies]
|
|
tokio.workspace = true
|
|
wiremock.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|