Dan6erbond / jolt

The social hub for your media server. Rate, review and recommend movies and shows, as well as manage your watchlist, follow friends and more.
MIT License
167 stars 3 forks source link

Implement Caching of TV Seasons and Episodes #8

Closed Dan6erbond closed 1 year ago

Dan6erbond commented 1 year ago

What is required?

In order to display seasons and episodes in the UI, as well as sync their watched status, they need to be efficiently fetched and cached from TMDB. The following logic will be used:

  1. On fetch of TV show (GetOrCreateByTmdbID()) the service will check if the show has completed.
  2. If not, seasons and episodes will be synced.
  3. First, the last cached season will be checked, and updated if necessary.
  4. All episodes of the last cached seasons, and newer seasons will be fetched from TMDB and updated.

Consumers will have to get seasons and episodes through the TvService to ensure that this logic is executed whenever these models are requested.