[Music] Show dialog when Music starts (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    I think I proposed the same, just having a starting screen which lists all available views.
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    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;
          }
     
    Last edited:

    Users who are viewing this thread

    Top Bottom