thetvdb / v4-api

Founded in 2006, TheTVDB is one of the longest-running community-driven TV and Movie databases. With content metadata across hundreds of thousands of TV series and movies, TheTVDB powers many of the largest media centers in the market. Developers across the world build and rely upon TheTVDB's APIs to power their apps, utilities, and projects, generating millions of API calls per day. In our GitHub repository you will find all of the necessary support and v4 API documentation to make use of TheTVDB's metadata. Come and join us!
135 stars 13 forks source link

Inconsistency in 2 API data calls #298

Open antheaezzell opened 1 year ago

antheaezzell commented 1 year ago

Hello,

For the TV Show Big Brother (US) with tvdbId = 76706 I have noticed an inconsistent response from the v4 API between 2 different calls.

My project (seriesreminder.com) makes use of the episode data to send emails when episodes air. Currently I am using the /seasons/{id}/extended to retrieve episode data. It looks like the new series API call returns all the episodes in a single call, is that considered the best practice to get all the episode information? It appears this is what is being used for the main site. Should I switch to using it rather than looping over the seasons to get all the episodes?

When I use the URL : https://api4.thetvdb.com/v4/series/76706/extended?meta=episodes&short=true

It responds with the same information that is on the TVDB website for Season 25 Episode 1 which is pasted here

{ "id": 9230248, "seriesId": 76706, "name": "Season Premiere", "aired": "2023-08-02", "runtime": 90, "nameTranslations": null, "overview": null, "overviewTranslations": null, "image": null, "imageType": null, "isMovie": 0, "seasons": null, "number": 1, "seasonNumber": 25, "lastUpdated": "2023-05-22 20:43:06", "finaleType": null, "year": "2023" }

The season id for season 25 is : 2063813

However, when I use the URL :

https://api4.thetvdb.com/v4/seasons/2063813/extended I get the following payload which contains different data for the episode 9230248

{ "status": "success", "data": { "id": 2063813, "seriesId": 76706, "type": { "id": 1, "name": "Aired Order", "type": "official", "alternateName": null }, "number": 25, "nameTranslations": [], "overviewTranslations": [], "companies": { "studio": [], "network": [], "production": [], "distributor": [], "special_effects": [] }, "lastUpdated": "2023-05-16 21:00:51", "year": "2023", "episodes": [ { "id": 9230248, "seriesId": 76706, "name": "--Needs Deleted--", "aired": "2023-07-12", "runtime": null, "nameTranslations": [ "eng" ], "overview": null, "overviewTranslations": [], "image": null, "imageType": null, "isMovie": 0, "seasons": null, "number": 1, "seasonNumber": 25, "lastUpdated": "2023-05-16 21:00:51", "finaleType": null, "year": "2023" } ], "trailers": [], "artwork": [], "tagOptions": null } }

antheaezzell commented 1 year ago

Ticketed as a bug to look into. Internal ticket for our reference: https://whipmedia.atlassian.net/browse/TVD-3766