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 1
MediaPortal 1 Plugins
[Plugin] MediaBrowser for MediaPortal (v0.30-beta) [2014/08/20]
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="armandp" data-source="post: 1033970" data-attributes="member: 71896"><p>to answer your question i only have a details and main window (and soon a dashboard window).</p><p>But if want to do something like this you can listen to the skin properties being set. You can do this with any of the zillion properties MediaBrowser sets during browsing or details view. Below an example if you would listen for the details.path property (which means someone is viewing details of an item and could press play)</p><p></p><p>Hook up an event listener to the property manager:</p><p>[code]</p><p>GUIPropertyManager.OnPropertyChanged += GUIPropertyManager_OnPropertyChanged;</p><p>[/code]</p><p></p><p>Handle the event</p><p>[code]</p><p>static void GUIPropertyManager_OnPropertyChanged(string tag, string tagValue)</p><p>{</p><p> // if we are not looking for this tag return</p><p> if(tag!="#MediaBrowser.Details.Path") return;</p><p></p><p> // do something with the value</p><p> string path = value</p><p> </p><p> // spin up disk logic based on folder in path </p><p>}</p><p>[/code]</p><p></p><p>i'm doing the same for debug logging all the mediabrowser properties (i use the threadpool in the listener though to not block the UI.</p><p>Example can be found in the MediaBrowserPlugin.cs on github.</p><p></p><p>You can listen for MediaBrowser.Current.Id that will hold either a guid or some human readable identifier of the view you are in. The code would best fit in a small process plugin.</p></blockquote><p></p>
[QUOTE="armandp, post: 1033970, member: 71896"] to answer your question i only have a details and main window (and soon a dashboard window). But if want to do something like this you can listen to the skin properties being set. You can do this with any of the zillion properties MediaBrowser sets during browsing or details view. Below an example if you would listen for the details.path property (which means someone is viewing details of an item and could press play) Hook up an event listener to the property manager: [code] GUIPropertyManager.OnPropertyChanged += GUIPropertyManager_OnPropertyChanged; [/code] Handle the event [code] static void GUIPropertyManager_OnPropertyChanged(string tag, string tagValue) { // if we are not looking for this tag return if(tag!="#MediaBrowser.Details.Path") return; // do something with the value string path = value // spin up disk logic based on folder in path } [/code] i'm doing the same for debug logging all the mediabrowser properties (i use the threadpool in the listener though to not block the UI. Example can be found in the MediaBrowserPlugin.cs on github. You can listen for MediaBrowser.Current.Id that will hold either a guid or some human readable identifier of the view you are in. The code would best fit in a small process plugin. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
[Plugin] MediaBrowser for MediaPortal (v0.30-beta) [2014/08/20]
Contact us
RSS
Top
Bottom