Closed mpfc75 closed 11 months ago
Actually, I think I misspoke about the show not having episodes. It does, just one and the show is in status 'planned'. Here is the info on the show, seasons, and episode:
https://api.trakt.tv/shows/173650/?extended=full,episodes
{
"title": "Mr. & Mrs. Smith",
"year": null,
"ids": {
"trakt": 173650,
"slug": "mr-mrs-smith-173650",
"tvdb": 396773,
"imdb": "tt14044212",
"tmdb": 118642,
"tvrage": null
},
"tagline": null,
"overview": "Based on the 2005 film Mr. & Mrs. Smith.",
"first_aired": null,
"airs": {
"day": "Thursday",
"time": "00:00",
"timezone": "America/New_York"
},
"runtime": 42,
"certification": null,
"network": "Amazon",
"country": "us",
"trailer": null,
"homepage": null,
"status": "planned",
"rating": 5.0,
"votes": 2,
"comment_count": 0,
"updated_at": "2023-10-11T22:27:55.000Z",
"language": "en",
"available_translations": [
"en",
"es",
"ru"
],
"genres": [],
"aired_episodes": 0
}
https://api.trakt.tv/shows/173650/seasons?extended=full,episodes
{
"number": 1,
"ids": {
"trakt": 243979,
"tvdb": null,
"tmdb": 181189,
"tvrage": null
},
"rating": 0.0,
"votes": 0,
"episode_count": 1,
"aired_episodes": 0,
"title": "Season 1",
"overview": null,
"first_aired": null,
"updated_at": "2023-11-01T13:02:37.000Z",
"network": "Amazon",
"episodes": [
{
"season": 1,
"number": 1,
"title": "Episode 1",
"ids": {
"trakt": 4810701,
"tvdb": null,
"imdb": null,
"tmdb": 2726037,
"tvrage": null
},
"number_abs": null,
"overview": null,
"rating": 0.0,
"votes": 0,
"comment_count": 0,
"first_aired": null,
"updated_at": "2023-10-31T23:11:12.000Z",
"available_translations": [],
"runtime": 42,
"episode_type": "series_premiere"
}
]
}
Closing... sorry for confusion. I reread the doc (RTFM right?) and I see that the endpoint returns the most recently aired episode or a 204. Apparently working as designed.
A 204 is a valid success, just with no content (i.e. null) being return. I think that is valid if there is no episode found. For that show, there are no aired episodes. We use the first_aired
and it is null
.
Trakt endpoint shows/id/last_episode returns HTTP 204 for shows that do not have any episodes. For example:
I was expecting to receive a 200 and a null episode. Is this an incorrect assumption on my part?