feat(watchlist): buildRecord — TMDB detail → canonical record
Port pure fn mapping raw TMDB JSON + prev frontmatter → WatchlistRecord. Fixtures from python reference selftest. TDD: 14 new cases all green.
This commit is contained in:
parent
732ec8adf6
commit
51d630fcd6
4 changed files with 435 additions and 0 deletions
80
tests/fixtures/tmdb-tv-loki.json
vendored
Normal file
80
tests/fixtures/tmdb-tv-loki.json
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"id": 84958,
|
||||
"name": "Loki",
|
||||
"original_name": "Loki",
|
||||
"original_language": "en",
|
||||
"spoken_languages": [
|
||||
{
|
||||
"iso_639_1": "en",
|
||||
"english_name": "English"
|
||||
}
|
||||
],
|
||||
"overview": "After stealing the Tesseract...",
|
||||
"episode_run_time": [],
|
||||
"status": "Ended",
|
||||
"first_air_date": "2021-06-09",
|
||||
"last_air_date": "2023-11-09",
|
||||
"number_of_seasons": 2,
|
||||
"number_of_episodes": 12,
|
||||
"networks": [
|
||||
{
|
||||
"name": "Disney+"
|
||||
}
|
||||
],
|
||||
"vote_average": 8.2,
|
||||
"homepage": "https://www.disneyplus.com/series/wp/6pARMvILBGzF",
|
||||
"poster_path": null,
|
||||
"genres": [
|
||||
{
|
||||
"name": "Drama"
|
||||
},
|
||||
{
|
||||
"name": "Sci-Fi & Fantasy"
|
||||
}
|
||||
],
|
||||
"origin_country": [
|
||||
"United States of America"
|
||||
],
|
||||
"created_by": [
|
||||
{
|
||||
"name": "Michael Waldron"
|
||||
}
|
||||
],
|
||||
"aggregate_credits": {
|
||||
"cast": [
|
||||
{
|
||||
"name": "Tom Hiddleston"
|
||||
},
|
||||
{
|
||||
"name": "Sophia Di Martino"
|
||||
}
|
||||
]
|
||||
},
|
||||
"external_ids": {
|
||||
"imdb_id": "tt9140554"
|
||||
},
|
||||
"content_ratings": {
|
||||
"results": [
|
||||
{
|
||||
"iso_3166_1": "US",
|
||||
"rating": "TV-14"
|
||||
}
|
||||
]
|
||||
},
|
||||
"videos": {
|
||||
"results": [
|
||||
{
|
||||
"site": "YouTube",
|
||||
"type": "Trailer",
|
||||
"official": true,
|
||||
"key": "nW948Va-l10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"last_episode_to_air": {
|
||||
"season_number": 2,
|
||||
"episode_number": 6,
|
||||
"name": "Glorious Purpose"
|
||||
},
|
||||
"next_episode_to_air": null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue