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
Featured Plugins
MP2Extended
Plugin: MP2Extended
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="MrTechno" data-source="post: 1160281" data-attributes="member: 111518"><p>You guess correctly. The Aspects property of MediaItem has gone from IDictionary<Guid, MediaItemAspect> to IDictionary<Guid, IList<MediaItemAspect>></p><p>You can still access the dictionary but it's not a MediaItemAspect any more so you'd have to work on the list instead using .First() or some other method to get the object you want.</p><p></p><p></p><p>Having a [] operator that returned a MediaItemAspect or null meant writing it in a way that it couldn't accidentally be used to get multiple MIAs. What would you do if there was more than one MIA (runtime exception, return null, return the first and hide the others)? The solution was to use SingleMediaItemAspectMetadata as the parameter type.</p><p></p><p></p><p>Some of the code is now easier e.g. the Count functions. Some is more difficult e.g. getting episodes for a series is a two level operation (series -> season -> episode).</p><p></p><p></p><p>107 to go.</p></blockquote><p></p>
[QUOTE="MrTechno, post: 1160281, member: 111518"] You guess correctly. The Aspects property of MediaItem has gone from IDictionary<Guid, MediaItemAspect> to IDictionary<Guid, IList<MediaItemAspect>> You can still access the dictionary but it's not a MediaItemAspect any more so you'd have to work on the list instead using .First() or some other method to get the object you want. Having a [] operator that returned a MediaItemAspect or null meant writing it in a way that it couldn't accidentally be used to get multiple MIAs. What would you do if there was more than one MIA (runtime exception, return null, return the first and hide the others)? The solution was to use SingleMediaItemAspectMetadata as the parameter type. Some of the code is now easier e.g. the Count functions. Some is more difficult e.g. getting episodes for a series is a two level operation (series -> season -> episode). 107 to go. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Featured Plugins
MP2Extended
Plugin: MP2Extended
Contact us
RSS
Top
Bottom