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
Development
Improvement Suggestions
Show dialog when Music starts
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="Deda" data-source="post: 1032745" data-attributes="member: 89768"><p>Actually it's pretty easy to do something like this in my videos, but don't ask me to do this in music <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />, result is that in shares view you will see all shares and all views so no need for hidden menu on start. To add extra things is like plugins is not so easy but I can't say that is impossible. Only problem with special views is that they are not so easy to create and some things are impossible without messing in MP code (like categories creation in MoPi)</p><p></p><p>[CODE]// Add db views after shares was added in facade layout with this:</p><p>in method</p><p>private void LoadDirectory(parameters)</p><p> {</p><p>......</p><p>.......</p><p>AddDbViews(itemlist); // itemlist contains shares, now it's time to add views</p><p></p><p>// Add db views after shares was added in facade layout with this:</p><p></p><p>private void AddDbViews(List<GUIListItem> itemList)</p><p> {</p><p> if (handler != null && handler.Views.Any() && _adddDbViewsToShares)</p><p> {</p><p> foreach (ViewDefinition view in handler.Views)</p><p> {</p><p> GUIListItem item = new GUIListItem();</p><p> item.IsFolder = true;</p><p> item.IsBdDvdFolder = false;</p><p> item.UserBool1 = true; // -->mark that this item is view, not some file or folder, this property (UserBool1) does not exist in GUIListItem but can be easily added</p><p> item.UserString1 = view.Name; // View name to open, this property (UserString1 ) does not exist in GUIListItem but can be easily added</p><p> item.Label = view.LocalizedName;</p><p> item.Label2 = "DBView";</p><p> item.IsPlayed = true;</p><p> item.OnItemSelected += item_OnItemSelected;</p><p> item.IconImageBig = "DefaultPlaylistBig.png";</p><p> item.IconImage = "DefaultPlaylist.png";</p><p> item.ThumbnailImage = "DefaultPlaylistBig.png";</p><p> facadeLayout.Add(item);</p><p> itemList.Add(item);</p><p> }</p><p> }</p><p> }</p><p>bla bla, end of LoadDirectory</p><p></p><p>// Test in onclick handler which opens dbview</p><p>protected override void OnClick(int iItem)</p><p> {</p><p> ... bla bla test against nulls and empty items then somewhere...</p><p> if (item.UserBool1)</p><p> {</p><p> _playClicked = false;</p><p> GUIVideoTitle videoTitle = (GUIVideoTitle)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_TITLE);</p><p> videoTitle.StartView = item.UserString1;</p><p> GUIWindowManager.ActivateWindow((int)Window.WINDOW_VIDEO_TITLE);</p><p> return;</p><p> }[/CODE]</p></blockquote><p></p>
[QUOTE="Deda, post: 1032745, member: 89768"] Actually it's pretty easy to do something like this in my videos, but don't ask me to do this in music :), result is that in shares view you will see all shares and all views so no need for hidden menu on start. To add extra things is like plugins is not so easy but I can't say that is impossible. Only problem with special views is that they are not so easy to create and some things are impossible without messing in MP code (like categories creation in MoPi) [CODE]// Add db views after shares was added in facade layout with this: in method private void LoadDirectory(parameters) { ...... ....... AddDbViews(itemlist); // itemlist contains shares, now it's time to add views // Add db views after shares was added in facade layout with this: private void AddDbViews(List<GUIListItem> itemList) { if (handler != null && handler.Views.Any() && _adddDbViewsToShares) { foreach (ViewDefinition view in handler.Views) { GUIListItem item = new GUIListItem(); item.IsFolder = true; item.IsBdDvdFolder = false; item.UserBool1 = true; // -->mark that this item is view, not some file or folder, this property (UserBool1) does not exist in GUIListItem but can be easily added item.UserString1 = view.Name; // View name to open, this property (UserString1 ) does not exist in GUIListItem but can be easily added item.Label = view.LocalizedName; item.Label2 = "DBView"; item.IsPlayed = true; item.OnItemSelected += item_OnItemSelected; item.IconImageBig = "DefaultPlaylistBig.png"; item.IconImage = "DefaultPlaylist.png"; item.ThumbnailImage = "DefaultPlaylistBig.png"; facadeLayout.Add(item); itemList.Add(item); } } } bla bla, end of LoadDirectory // Test in onclick handler which opens dbview protected override void OnClick(int iItem) { ... bla bla test against nulls and empty items then somewhere... if (item.UserBool1) { _playClicked = false; GUIVideoTitle videoTitle = (GUIVideoTitle)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_TITLE); videoTitle.StartView = item.UserString1; GUIWindowManager.ActivateWindow((int)Window.WINDOW_VIDEO_TITLE); return; }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
Show dialog when Music starts
Contact us
RSS
Top
Bottom