API v2 - Update Question

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
Post Reply
dehct
Posts: 8
Joined: Mon Jan 25, 2016 4:43 pm

Fri Oct 06, 2017 11:19 am

Hello all,
Could someone please confirm which of the following is true?
1. The lastUpdated property of a Series represents the latest time that any properties of the series, or any of the properties of the Episodes or Actors associated with that series, were updated. A pseudo formula would look something like this:

Code: Select all

Series.lastUpdate = MAX(Series.lastUpdate, MAX(Series.Episodes.lastUpdate), MAX(Series.Actors.lastUpdated)))
where MAX is the most recent lastUpdate for the item or collection of items.

2. The lastUpdated property of a Series only represents the latest time that any property of the series was updated; it does not reflect updates or additions to the Episodes or Actors associated with the series.

I'm hoping that the first is true, since that greatly simplifies determining which series need to be examined for changes.

Also, can anyone explain why the actor.LastUpdated properties doesn't use the Epoch timestamp used by Series and Episode?

Thanks in advance -- any assistance would be greatly appreciated.
dehct
Posts: 8
Joined: Mon Jan 25, 2016 4:43 pm

Fri Oct 06, 2017 6:59 pm

Well, I've (mostly) answered my own question. Based on a refresh via API v2, it would appear that when an episode is updated after a series, the lastUpdated property of the Series is not modified.

The following image is part of a screen shot from the utility I wrote to check on this. The relevant columns are tvDB Update and Latest Episode. For the rows in blue, the last updated episode was after the lastUpdated property of the Series. I haven't checked Actors yet, but I'm assuming it works the same way.

Hopefully you can see this DropBox image. https://www.dropbox.com/s/bx7y2z36upmrd ... s.png?dl=0.

I believe this means that in order to check whether a series I'm following has been updated or not, I can't simply rely on the \Updated query, since finding a series in that list only means that a property of the Series itself has been updated; I'll need to check all episodes and actors for that series as well. Have I got that right? Or has anyone else had a different experience?

Thanks!
Post Reply