Closed rysson closed 11 months ago
Not a bad idea, but the problem is the data from /sync/watched/shows
is heavily cached so those counts could be stale for a while and not accurate. This is the main reason we suggest caching the show data separately and updating it using the /shows/updates
endpoint to know you need to refresh that specific show locally. Does that work for you?
Have to :-)
I see, invalidate cache is too heavy task. Ok, updates could help if I'll find the season and episode counts. I can't see them in any object, could you help me?
How to get progress (including watched and non-watched segments)) using pure API?
If you add ?exeneded=full
the show object will include the aired_episodes
count.
If you need progress for 1 show, you can use: https://trakt.docs.apiary.io/#reference/shows/watched-progress/get-show-watched-progress
If you're trying to recreate the progress page as seen on Trakt, you should cache the watched data + all metadata for each show, then calculate the progress yourself. That will be the most efficient since most of the data isn't changing that often.
Thanks a lot.
Background
Imagine list od shows. I can select one, enter to its seasons. Select one and enter to its episodes. It will be very nice to see on all tree levels if items are watched, in progress (partially watched) or not watched at all.
Episodes are ok, I can read it from
/sync/watched/shows
and/sync/playback
.I have same problems with seasons and tv-shows level.
Current objects
Now in
/sync/watched/shows
I have number of play but I don't know how many seasons or episodes are.BTW, I see
plays
in show is a sum of allplays
inside than could be bigger then number of the episodes at all event if I watched only one episode (many times of course)Suggestion
I suggest add
season_count
/number_of_seasons
for tv-show andepisode_count
for each season.If I could find those numbers there I would have all information to show watched / progress on all levels without any extra request.
Maybe even add those number for all
show
andseason
objects not only the history?Ask
What do you think about it?
Of course if there is no any problem (like performance).
Maybe I miss something and you point me another solution.