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
Plugin Development
Need a little help with plugin development
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="morpheus_xx" data-source="post: 1187386" data-attributes="member: 48495"><p>Nice progress <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite24" alt="(y)" title="Thumbs Up (y)" loading="lazy" data-shortname="(y)" /></p><p></p><p>Some recommendations: you can use the exisiting generic convenience methods to access the Aspect properties, like example <a href="https://github.com/MediaPortal/MediaPortal-2/blob/54539a4bdc32812abab0a2121bf873fb1ced2b09/MediaPortal/Source/Extensions/MetadataExtractors/SeriesMetadataExtractor/SeriesMetadataExtractor.cs#L105-L122" target="_blank">here</a>:</p><p>[code=csharp] // First check if we already have a complete match from a previous MDE</p><p> string title;</p><p> int tvDbId;</p><p> int seasonNumber;</p><p> IEnumerable<int> episodeNumbers;</p><p> if (MediaItemAspect.TryGetAttribute(extractedAspectData, MediaAspect.ATTR_TITLE, out title) &&</p><p> MediaItemAspect.TryGetAttribute(extractedAspectData, SeriesAspect.ATTR_TVDB_ID, out tvDbId) &&</p><p> MediaItemAspect.TryGetAttribute(extractedAspectData, SeriesAspect.ATTR_SEASON, out seasonNumber) &&</p><p> (episodeNumbers = extractedAspectData[SeriesAspect.ASPECT_ID].GetCollectionAttribute<int>(SeriesAspect.ATTR_EPISODE)) != null)</p><p>[/code]</p><p></p><p>For the GUI wrappers there are also implementation for each aspect (code auto generated), <a href="https://github.com/MediaPortal/MediaPortal-2/blob/54539a4bdc32812abab0a2121bf873fb1ced2b09/MediaPortal/Source/UI/UiComponents/Media/Models/AspectWrappers/SeriesAspectWrapper.cs#L228-L248" target="_blank">here</a>. (This would match your scenario).</p><p></p><p>Then there is also the other way around, the class SeriesInfo has a method to fill the aspects <a href="https://github.com/MediaPortal/MediaPortal-2/blob/54539a4bdc32812abab0a2121bf873fb1ced2b09/MediaPortal/Source/Core/MediaPortal.Common/MediaManagement/Helpers/SeriesInfo.cs#L198-L230" target="_blank">here</a>. We could add a reverse method (aspect data to SeriesInfo class). This would help other devs as well.</p><p></p><p>I recently modified the client side search in this commit: <a href="https://github.com/MediaPortal/MediaPortal-2/commit/1b31d6a2691880171677c664f227313faa6acac4#diff-3b121ade264ac0615b32cfe61ef8aca2R42" target="_blank">https://github.com/MediaPortal/MediaPortal-2/commit/1b31d6a2691880171677c664f227313faa6acac4#diff-3b121ade264ac0615b32cfe61ef8aca2R42</a>. It's not yet merged to dev/master, but included in recent weekly builds. This is the example for loading a series by name filters.</p><p></p><p></p><p>Regarding the other required information for your idea. You have to include more AspectIds in the media query:</p><ul> <li data-xf-list-type="ul">MediaAspect: the "master data", in principle only ID, title, mimetype.<br /> </li> <li data-xf-list-type="ul">VideoAspect: contains video related info like resolution, video and audio formats</li> <li data-xf-list-type="ul">ProviderResourceAspect: contains the path for the media item</li> </ul><p>More information can be found in the wiki: <a href="http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/8_Contribute/Development/3_Concepts/Metadata_system/1_MediaAspects/5_Series" target="_blank">http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/8_Contribute/Development/3_Concepts/Metadata_system/1_MediaAspects/5_Series</a> and in the code parts that deal with those aspects.</p><p></p><p></p><p>For my local data the result is ok, the TvDbIds are (mostly) filled. This needs more checks and of course we would be happy if you contribute fixes to MP2 <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite24" alt="(y)" title="Thumbs Up (y)" loading="lazy" data-shortname="(y)" /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1187386, member: 48495"] Nice progress (y) Some recommendations: you can use the exisiting generic convenience methods to access the Aspect properties, like example [URL='https://github.com/MediaPortal/MediaPortal-2/blob/54539a4bdc32812abab0a2121bf873fb1ced2b09/MediaPortal/Source/Extensions/MetadataExtractors/SeriesMetadataExtractor/SeriesMetadataExtractor.cs#L105-L122']here[/URL]: [code=csharp] // First check if we already have a complete match from a previous MDE string title; int tvDbId; int seasonNumber; IEnumerable<int> episodeNumbers; if (MediaItemAspect.TryGetAttribute(extractedAspectData, MediaAspect.ATTR_TITLE, out title) && MediaItemAspect.TryGetAttribute(extractedAspectData, SeriesAspect.ATTR_TVDB_ID, out tvDbId) && MediaItemAspect.TryGetAttribute(extractedAspectData, SeriesAspect.ATTR_SEASON, out seasonNumber) && (episodeNumbers = extractedAspectData[SeriesAspect.ASPECT_ID].GetCollectionAttribute<int>(SeriesAspect.ATTR_EPISODE)) != null) [/code] For the GUI wrappers there are also implementation for each aspect (code auto generated), [URL='https://github.com/MediaPortal/MediaPortal-2/blob/54539a4bdc32812abab0a2121bf873fb1ced2b09/MediaPortal/Source/UI/UiComponents/Media/Models/AspectWrappers/SeriesAspectWrapper.cs#L228-L248']here[/URL]. (This would match your scenario). Then there is also the other way around, the class SeriesInfo has a method to fill the aspects [URL='https://github.com/MediaPortal/MediaPortal-2/blob/54539a4bdc32812abab0a2121bf873fb1ced2b09/MediaPortal/Source/Core/MediaPortal.Common/MediaManagement/Helpers/SeriesInfo.cs#L198-L230']here[/URL]. We could add a reverse method (aspect data to SeriesInfo class). This would help other devs as well. I recently modified the client side search in this commit: [URL]https://github.com/MediaPortal/MediaPortal-2/commit/1b31d6a2691880171677c664f227313faa6acac4#diff-3b121ade264ac0615b32cfe61ef8aca2R42[/URL]. It's not yet merged to dev/master, but included in recent weekly builds. This is the example for loading a series by name filters. Regarding the other required information for your idea. You have to include more AspectIds in the media query: [LIST] [*]MediaAspect: the "master data", in principle only ID, title, mimetype. [*]VideoAspect: contains video related info like resolution, video and audio formats [*]ProviderResourceAspect: contains the path for the media item [/LIST] More information can be found in the wiki: [URL]http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/8_Contribute/Development/3_Concepts/Metadata_system/1_MediaAspects/5_Series[/URL] and in the code parts that deal with those aspects. For my local data the result is ok, the TvDbIds are (mostly) filled. This needs more checks and of course we would be happy if you contribute fixes to MP2 (y) :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Need a little help with plugin development
Contact us
RSS
Top
Bottom