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
Get MediaItem object from a MediaItemId (Guid)
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="McGoober" data-source="post: 820081" data-attributes="member: 24098"><p>I'm coding against IMediaLibrary in a plugin. I have exposed MediaItem.MediaItemId (guid) to a remote application as a unique reference to a media item, but when that app calls back again with this guid I want to turn it back into a MediaItem object. Doing a search is the only way I can think of doing it, but I can't figure out the filter I need since there doesn't seem to be an attribute I can use.</p><p></p><p></p><p>What I want to do is...</p><p></p><p>public MediaItem GetItemFromMediaItemId(Guid ObjectId)</p><p>{</p><p> var library = ServiceRegistration.Get<IMediaLibrary>();</p><p> <strong>return library.GetMediaItem(ObjectId, necessaryMIATypeIDs, optionalMIATypeIDs);</strong></p><p>}</p></blockquote><p></p>
[QUOTE="McGoober, post: 820081, member: 24098"] I'm coding against IMediaLibrary in a plugin. I have exposed MediaItem.MediaItemId (guid) to a remote application as a unique reference to a media item, but when that app calls back again with this guid I want to turn it back into a MediaItem object. Doing a search is the only way I can think of doing it, but I can't figure out the filter I need since there doesn't seem to be an attribute I can use. What I want to do is... public MediaItem GetItemFromMediaItemId(Guid ObjectId) { var library = ServiceRegistration.Get<IMediaLibrary>(); [B]return library.GetMediaItem(ObjectId, necessaryMIATypeIDs, optionalMIATypeIDs);[/B] } [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Get MediaItem object from a MediaItemId (Guid)
Contact us
RSS
Top
Bottom