[Approved] Video sort method (1 Viewer)

draclich

Portal Member
March 4, 2007
21
3
melb.vic.au
Home Country
This is a patch to allow sorting of videos on both created and modified date. Its based off svn rev 25976.

I had to add a new localization and as such just added a high id value to it.

This is in response to my other thread in the RC4 forum.

update patch to rev 26938
 

Attachments

  • additional_sort.patch
    6.9 KB

The_Stig

Retired Team Member
  • Premium Supporter
  • April 5, 2005
    2,176
    428
    AW: Video sort method

    I like that option but cannot judge on code quality.
     

    chemelli

    Retired Team Member
  • Premium Supporter
  • September 28, 2006
    6,159
    2,264
    51
    Milano, Italy
    Home Country
    Italy Italy
    Can you please update the patch to current trunk ?

    We would like to be as generic as possible ( means all plugins not only Video). There was a big rework to cleanup code and remove redundant parts of it so this may fit better now.

    Simone
     

    draclich

    Portal Member
    March 4, 2007
    21
    3
    melb.vic.au
    Home Country
    Hi,

    Updated for 26839. Cleaned up the code a little.

    While I only use this function within the video section it might be applicable for other media types. However the music section is complicated with the DB view and share view using the same case. Before I start any work within that section I would like to understand if this patch will be taken up.

    Regards
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Not sure this should be made more generic. Music and Video sorts are quite different.

    Video
    Code:
        public enum SortMethod
        {
          Name = 0,
          Date = 1,
          Size = 2,
          Year = 3,
          Rating = 4,
          Label = 5,
          Unwatched = 6
        }

    Music
    Code:
        public enum SortMethod
        {
          Name = 0,
          Date = 1, // Shares View = File Modification Date, Database View = Date Added
          Size = 2,
          Track = 3,
          Duration = 4,
          Title = 5,
          Artist = 6,
          Album = 7,
          Filename = 8,
          Rating = 9,
          AlbumArtist = 10, // Only used internally when albumartists or albums need to be sorted by Artist
          Year = 11, // Used Internally, when Sorting by Date is selected from GUI and Year defined as DefaultSort
          DiscID = 12,
        }

    Also music database does not contain a modified date and sort code is shared between shares and database windows.

    My thought is to leave this as video only?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Other thing is I don't think we should change string 104 as this is used elsewhere (eg. Music) and probably pics and third party plugins. This should be a new string.
     

    draclich

    Portal Member
    March 4, 2007
    21
    3
    melb.vic.au
    Home Country
    Updated the patch to current svn and added default sort order as descending for modified and created method

    see first post for patch
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Patch is really ok and clean and it do the job. I just moved new strings to non reserved place (id#1220 and id#1221) and adapt patch for those news IDs.

    As jameson said, this can't be applied to music, otherwise there should be need to do big Windows plugins code rework for music and videos which is, IMHO, not needed for MP1 for this.

    I will extend this to My Pictures sort as it can be easily applied there.

    Last words, this can go in 1.2.0 Beta, will not break anything, just one sort method is split into two so users can choose which one prefers.

    It's in SVN 3347 for 1.2.0 beta release. Thx draclich.
     

    Attachments

    • DateSort.patch
      7.6 KB

    Users who are viewing this thread

    Top Bottom