home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Submit: Code Patches
Reading IMDB tag from Matroska files for series
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="chefkoch" data-source="post: 972991" data-attributes="member: 10438"><p>TheTvDb.com supports retrieving a series search result by a matching IMDB id: <a href="http://www.thetvdb.com/wiki/index.php?title=API:GetSeriesByRemoteID" target="_blank">http://www.thetvdb.com/wiki/index.php?title=API:GetSeriesByRemoteID</a></p><p> </p><p>The API is already implemented within our OnlineLibraries:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/Libraries/TvdbLib/TvdbHandler.cs#L323-L333" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/Libraries/TvdbLib/TvdbHandler.cs#L323-L333</a></p><p> </p><p>I created a branch to make use of it within the SeriesMetadataExtractor:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/compare/FIX_MediaTitleForEpisodes...FEAT_SeriesByImdb" target="_blank">https://github.com/MediaPortal/MediaPortal-2/compare/FIX_MediaTitleForEpisodes...FEAT_SeriesByImdb</a></p><ul> <li data-xf-list-type="ul">The series name, season index and episode name is already read from Matroska.<br /> 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.</li> <li data-xf-list-type="ul">The additional code <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L102-L106" target="_blank">1</a> within the SeriesTvDbMatcher has been added similar</li> </ul><p></p><p>A few points, which I would like to have your approval @<a href="https://forum.team-mediaportal.com/members/morpheus_xx.48495/" target="_blank">morpheus_xx</a>:</p><p> </p><p><strong>ImdbIdMatcher</strong></p><p>I <a href="https://github.com/MediaPortal/MediaPortal-2/commit/f69c8d06bf38243c57358c82b050f80e66da17fc" target="_blank">moved the IMDB id Matcher from MovieMDE to MediaPortal.Common</a> to have it available for SeriesMDE as well.</p><p>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.</p><p>We also already have<a href="https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/Core/MediaPortal.Common/MediaManagement/Helpers/MovieInfo.cs#L43" target="_blank"> imdb fields in MediaPortal.Common</a>, so it is not the first related code there.</p><p> </p><p><strong>SeriesAspect</strong></p><p>The MovieAspect implements an <a href="https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/Core/MediaPortal.Common/MediaManagement/Helpers/MovieInfo.cs#L94" target="_blank">IMDB attribute</a>. Do we need this for Series as well or can be leave it out?</p><p> </p><p><strong>API Caching</strong></p><p>There are 2 calls to the TvDbAPIWrapper needed when using the IMDB matching:</p><p> </p><p>The <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L136" target="_blank">second one</a> is retrieving the full series info, and is already <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/TheTvDB/TvDbWrapper.cs#L162-L173" target="_blank">cached by the wrapper</a> itself. So no problems here.</p><p>The <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/TheTvDB/TvDbWrapper.cs#L175-L185" target="_blank">first one</a> gets the series as TvdbSearchResult. This one is not being cached <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/TheTvDB/TvDbWrapper.cs#L175-L185" target="_blank">by the TvDbWrapper</a>.</p><p> </p><p>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.</p><p>Nevertheless should we cache the imdb lookup results anyway?</p><p>If so I would do it similar to the <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L220" target="_blank">TryMatch </a>method using the same _memoryMatcher and the MatchingFile. but instead of the match with the <a href="https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L142" target="_blank">SeriesName as ItemName</a>, it would match the ImdbId as ItemName.</p></blockquote><p></p>
[QUOTE="chefkoch, post: 972991, member: 10438"] TheTvDb.com supports retrieving a series search result by a matching IMDB id: [url]http://www.thetvdb.com/wiki/index.php?title=API:GetSeriesByRemoteID[/url] The API is already implemented within our OnlineLibraries: [url]https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/Libraries/TvdbLib/TvdbHandler.cs#L323-L333[/url] I created a branch to make use of it within the SeriesMetadataExtractor: [url]https://github.com/MediaPortal/MediaPortal-2/compare/FIX_MediaTitleForEpisodes...FEAT_SeriesByImdb[/url] [LIST] [*]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 [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L102-L106']1[/URL] within the SeriesTvDbMatcher has been added similar [/LIST] A few points, which I would like to have your approval @[URL='https://forum.team-mediaportal.com/members/morpheus_xx.48495/']morpheus_xx[/URL]: [B]ImdbIdMatcher[/B] I [URL='https://github.com/MediaPortal/MediaPortal-2/commit/f69c8d06bf38243c57358c82b050f80e66da17fc']moved the IMDB id Matcher from MovieMDE to MediaPortal.Common[/URL] 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[URL='https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/Core/MediaPortal.Common/MediaManagement/Helpers/MovieInfo.cs#L43'] imdb fields in MediaPortal.Common[/URL], so it is not the first related code there. [B]SeriesAspect[/B] The MovieAspect implements an [URL='https://github.com/MediaPortal/MediaPortal-2/blob/dev/MediaPortal/Source/Core/MediaPortal.Common/MediaManagement/Helpers/MovieInfo.cs#L94']IMDB attribute[/URL]. Do we need this for Series as well or can be leave it out? [B]API Caching[/B] There are 2 calls to the TvDbAPIWrapper needed when using the IMDB matching: The [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L136']second one[/URL] is retrieving the full series info, and is already [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/TheTvDB/TvDbWrapper.cs#L162-L173']cached by the wrapper[/URL] itself. So no problems here. The [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/TheTvDB/TvDbWrapper.cs#L175-L185']first one[/URL] gets the series as TvdbSearchResult. This one is not being cached [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/TheTvDB/TvDbWrapper.cs#L175-L185']by the TvDbWrapper[/URL]. 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 [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L220']TryMatch [/URL]method using the same _memoryMatcher and the MatchingFile. but instead of the match with the [URL='https://github.com/MediaPortal/MediaPortal-2/blob/a04a4415116058eff70428fa22e5529420767cb4/MediaPortal/Source/Extensions/MetadataExtractors/OnlineLibraries/SeriesTvDbMatcher.cs#L142']SeriesName as ItemName[/URL], it would match the ImdbId as ItemName. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Submit: Code Patches
Reading IMDB tag from Matroska files for series
Contact us
RSS
Top
Bottom