[Evaluate] Reading IMDB tag from Matroska files for series (1 Viewer)

chefkoch

Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,634
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    TheTvDb.com supports retrieving a series search result by a matching IMDB id: http://www.thetvdb.com/wiki/index.php?title=API:GetSeriesByRemoteID

    The API is already implemented within our OnlineLibraries:
    https://github.com/MediaPortal/Medi...es/Libraries/TvdbLib/TvdbHandler.cs#L323-L333

    I created a branch to make use of it within the SeriesMetadataExtractor:
    https://github.com/MediaPortal/MediaPortal-2/compare/FIX_MediaTitleForEpisodes...FEAT_SeriesByImdb
    • The series name, season index and episode name is already read from Matroska.
      At the same time the IMDB tag for the series level is read now as well at the same time, no issues/questions about that.
    • The additional code 1 within the SeriesTvDbMatcher has been added similar

    A few points, which I would like to have your approval @morpheus_xx:

    ImdbIdMatcher
    I moved the IMDB id Matcher from MovieMDE to MediaPortal.Common to have it available for SeriesMDE as well.
    I see no problem with it as it is a very simply class containing only the RegEx parsing code within a static method, so it has nothing to do with any online lookups.
    We also already have imdb fields in MediaPortal.Common, so it is not the first related code there.

    SeriesAspect
    The MovieAspect implements an IMDB attribute. Do we need this for Series as well or can be leave it out?

    API Caching
    There are 2 calls to the TvDbAPIWrapper needed when using the IMDB matching:

    The second one is retrieving the full series info, and is already cached by the wrapper itself. So no problems here.
    The first one gets the series as TvdbSearchResult. This one is not being cached by the TvDbWrapper.

    The SearchResult which is being retrieved from the TheTvDb.com will be one, since each IMDB id should have been added only once to the database, downloaded data for result should not be very much.
    Nevertheless should we cache the imdb lookup results anyway?
    If so I would do it similar to the TryMatch method using the same _memoryMatcher and the MatchingFile. but instead of the match with the SeriesName as ItemName, it would match the ImdbId as ItemName.
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Hi,

    Nevertheless should we cache the imdb lookup results anyway?

    For this question I would say yes for the retrived IDs, in order to match best practice from TheTVDB and unload the servers.

    From http://www.thetvdb.com/wiki/index.php/Programmers_API, example usage section. See step "c" :

    Step 3: Loop through and look up each series id
    a. Retrieve http://www.thetvdb.com/api/GetSeries.php?seriesname=<series name from your database>
    b. Optionally present results to user so they can select the match they want.
    c. Store this series id in a table in your database.

    Cheers.
     

    Users who are viewing this thread

    Top Bottom