[Music] - Show dialog when Music starts | Page 2

Discussion in 'Improvement Suggestions' started by bribbon, April 16, 2013.

  1. mbuzina
    • Team MediaPortal

    mbuzina Retired Team Member

    Joined:
    April 11, 2005
    Messages:
    2,839
    Likes Received:
    627
    Location:
    Germany
    Ratings:
    +723 / 4
    Home Country:
    Germany Germany
    Show System Specs
    I think I proposed the same, just having a starting screen which lists all available views.


     
    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. bribbon
    • Premium Supporter

    bribbon MP Donator

    Joined:
    September 11, 2008
    Messages:
    468
    Likes Received:
    95
    Gender:
    Male
    Ratings:
    +106 / 0
    Home Country:
    Switzerland Switzerland
    Show System Specs
    push
     
  4. Deda
    • Team MediaPortal

    Deda Lead Dev MP1 Videos

    Joined:
    March 18, 2009
    Messages:
    2,423
    Likes Received:
    2,098
    Gender:
    Male
    Occupation:
    IT Consultant
    Location:
    Zagreb
    Ratings:
    +2,385 / 1
    Home Country:
    Croatia Croatia
    Show System Specs
    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 (Text):
    1. // Add db views after shares was added in facade layout with this:
    2. in method
    3. private void LoadDirectory(parameters)
    4.   {
    5. ......
    6. .......
    7. AddDbViews(itemlist); // itemlist contains shares, now it's time to add views
    8.  
    9. // Add db views after shares was added in facade layout with this:
    10.  
    11. private void AddDbViews(List<GUIListItem> itemList)
    12.     {
    13.       if (handler != null && handler.Views.Any() && _adddDbViewsToShares)
    14.       {
    15.         foreach (ViewDefinition view in handler.Views)
    16.         {
    17.           GUIListItem item = new GUIListItem();
    18.           item.IsFolder = true;
    19.           item.IsBdDvdFolder = false;
    20.           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
    21.           item.UserString1 = view.Name; // View name to open, this property (UserString1 ) does not exist in GUIListItem but can be easily added
    22.           item.Label = view.LocalizedName;
    23.           item.Label2 = "DBView";
    24.           item.IsPlayed = true;
    25.           item.OnItemSelected += item_OnItemSelected;
    26.           item.IconImageBig = "DefaultPlaylistBig.png";
    27.           item.IconImage = "DefaultPlaylist.png";
    28.           item.ThumbnailImage = "DefaultPlaylistBig.png";
    29.           facadeLayout.Add(item);
    30.           itemList.Add(item);
    31.         }
    32.       }
    33.     }
    34. bla bla, end of LoadDirectory
    35.  
    36. // Test in onclick handler which opens dbview
    37. protected override void OnClick(int iItem)
    38.   {
    39.      ... bla bla test against nulls and empty items then somewhere...
    40.         if (item.UserBool1)
    41.       {
    42.         _playClicked = false;
    43.         GUIVideoTitle videoTitle = (GUIVideoTitle)GUIWindowManager.GetWindow((int)Window.WINDOW_VIDEO_TITLE);
    44.         videoTitle.StartView = item.UserString1;
    45.         GUIWindowManager.ActivateWindow((int)Window.WINDOW_VIDEO_TITLE);
    46.         return;
    47.       }
     
    Last edited: October 10, 2013
    • Thank You! Thank You! x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!