Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Idea] Fetch Season and Episode from TheMovieDB #27

Open
tunip opened this issue Nov 7, 2016 · 6 comments
Open

[Idea] Fetch Season and Episode from TheMovieDB #27

tunip opened this issue Nov 7, 2016 · 6 comments
Milestone

Comments

@tunip
Copy link
Contributor

tunip commented Nov 7, 2016

If it is useful (this is just an idea), we could fetch more season & episode informaton not only from the VDR plot (which is a nice improvment).

This is what we already have for artwork:

Request example:
https://api.themoviedb.org/3/search/tv?api_key=<apikey>&language=de-DE&query=The%20Mentalist
Response example:
{
...
      "poster_path": "/gdkkBruycNl9NlHFnxRuqVHfsvt.jpg",
      "popularity": 8.190228,
      "id": 5920,
      "backdrop_path": "/rLpLagiCqa6wDYKnFbwY2RhxO8o.jpg",
      "vote_average": 7.1,
      "overview": "Mit unvergleichlicher Beobachtungsgabe und verblüffender...",
...
}

We could may extend this for series only events to fetch the TVDB id (with respect of language setting):

Request with the show id "5920" from TMDB:
https://api.themoviedb.org/3/tv/5920/external_ids?api_key=<apikey>&language=de-DE
Response with the id of TVDB -> 82459:
{
  "imdb_id": "tt1196946",
  "freebase_mid": "/m/04csmqp",
  "freebase_id": "/en/the_mentalist",
  "tvdb_id": 82459,
  "tvrage_id": 18967,
  "id": 5920
}

Now we can fetch the season & episode information of the event from TVDB and compare EpisodeName with the subtile of VDR event and we have S05E01 for this show:

Request:
https://thetvdb.com/api/<apikey>/series/82459/all/de.xml
Response:
...
<EpisodeName>Rote Glasperlen</EpisodeName>
<EpisodeNumber>1</EpisodeNumber>
<FirstAired>2012-09-30</FirstAired>
<GuestStars>
|Polly Walker|Amanda Detmer|Jim O'Heir|Drew Powell|Ivan Sergei|Jon Curry|John Rubinstein|Kelly Schumann|Esther Scott|Dina Simon|Emmanuelle Chriqui|Mandy Kowalski|
</GuestStars>
<IMDB_ID>tt2402469</IMDB_ID>
<Language>de</Language>
<Overview>
Mal wieder das FBI: Als Patrick Jane kurz davor ist, den Serienmörder Red John endlich zu stellen, werden seine Pläne zunichte gemacht: Durch einen dilettantischen Einsatz des FBI, bei dem auch noch CBI-Direktor Wainwright versehentlich erschossen wird. Patricks einzige Hoffnung, Red John doch noch auf die Spur zu kommen, ist Lorelei Martins. Die Vertraute des Serienmörders befindet sich in den Händen des CBI – doch das FBI besteht darauf, Lorelei selbst in Gewahrsam zu nehmen.
</Overview>
<ProductionCode/>
<Rating>7.7</Rating>
<RatingCount>106</RatingCount>
<SeasonNumber>5</SeasonNumber>
<Writer>Bruno Heller</Writer>
<absolute_number>95</absolute_number>
<filename>episodes/82459/4359109.jpg</filename>
<is_movie>0</is_movie>
...
@pipelka
Copy link
Owner

pipelka commented Nov 7, 2016

Yeah. That would be nice and isn't really a great deal. Nevertheless it needs some internal refactoring because it would be the best to use these descriptions also for recordings.
I'll schedule this for the 0.6.1 release because I don't want to add new features before the 0.6.0 release.

@tunip tunip added this to the 0.6.1 milestone Nov 7, 2016
@pipelka
Copy link
Owner

pipelka commented Nov 24, 2016

Another nice benefit would be to get the episode image. That would look great for the tv show detail view.
A drawback is definitely the increasing processing time. Caching of fetched items is needed.

@tunip
Copy link
Contributor Author

tunip commented Nov 24, 2016

Can we maybe cache on the server side if we have multiple clients? And set a retention time (n days) for cached data would help for repeating events. Or a max cache size (e.g. 100MB) which deletes the oldest data for new stuff.

@pipelka pipelka modified the milestones: 0.6.2, 0.6.1 Dec 4, 2016
@pipelka
Copy link
Owner

pipelka commented Dec 4, 2016

Sorry for shifting this to 0.6.2 but 0.6.1 will be a bugfix release.

@tunip
Copy link
Contributor Author

tunip commented Dec 5, 2016

No rush, stability is more important :-).

@pipelka pipelka modified the milestones: 0.6.3, 0.6.2 Mar 3, 2017
@pipelka
Copy link
Owner

pipelka commented Mar 3, 2017

Ooops, I did it again, ...
0.6.2 will be one more bug-fix release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants