[Rejected] Add #itemcount to music playlist (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Problem
    #itemcount not created for music playlist. It is for music files, video files and video playlist as well as pictures.

    Solution
    Expose the playlist itemcount as #itemcount. This patch does exactly that.

    Code:
    Index: GUIMusicPlaylist.cs
    ===================================================================
    --- GUIMusicPlaylist.cs	(revision 27093)
    +++ GUIMusicPlaylist.cs	(working copy)
    @@ -681,6 +681,12 @@
             
             facadeLayout.Add(pItem);
           }
    +
    +      int iTotalItems = pl.Count;
    +
    +      //set object count label
    +      GUIPropertyManager.SetProperty("#itemcount", Util.Utils.GetObjectCountLabel(iTotalItems));
    +
           
           SetLabels();
     

    Attachments

    • Add itemcount to GUIMusicPlaylist.patch
      473 bytes

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Playlist screen has not had the love and attention that shares and database browsing views have had.

    I think an easier way to fix this is to call SetLabels in GUIMusicBaseWindow.cs and this will also set the total duration correctly.

    This however is a bit of a mess and I need to sort out 0003195: Music Label Issues - MediaPortal Bugtracker so should fix this and the duration as part of this

    I will mark this as rejected as there is no way of marking this as going to be fixed in another way but thanks for the patch and keep the issues coming :)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    Very nice to hear, I know it's quite a task to sort out all the duplicate code, and to keep the rest working anyway :D

    :D
     

    Users who are viewing this thread

    Top Bottom