[fixed] AddAllToPlaylist has wrong MediaItems sort order (1 Viewer)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    This is only a minor issue I think:

    I have browsed the pictures library for year 2011, found 183 pictures and pressed "add all to playlist".

    Before on media browing screen order is correct:
    • 2012 - 1
    • 2012 - 2
    • 2012 - 3
    • ...
    • Zombiland - 1
    • Zombiland - 2
    • Zombiland - 3
    But adding the list to playlist results in a strange sorted list: it seems like it is descending sorted by first letter, then ascending inside the group of same letter:
    • Zombiland - 1
    • Zombiland - 2
    • Zombiland - 3
    • ...
    • 2012 - 1
    • 2012 - 2
    • 2012 - 3

    Note: Z before number, but all "Z" entries are ordered correctly ascending
     

    Attachments

    • pictures_browse.jpg
      pictures_browse.jpg
      234.6 KB
    • pictures_playlist_sorted.jpg
      pictures_playlist_sorted.jpg
      315 KB

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #3
    Can you point me the direction what I should check? I will then investigate and try to fix this...
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    You would need to do the correct sorting of the returned media items in method AbstractScreenData.GetAllMediaItems(). But unfortunately, in that method the necessary sort delegate function is not available currently. To fix that bug, the sorting data has to be extracted from the navigation items and modeled as an explicit sort delegate which must be made available in class AbstractScreenData. That is too complicated to do it in two hours, if you don't know the classes and their relationships in the Media plugin exactly...
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    The sorting has been reworked in the Media plugin. Now, we have a "Sorting" menu item where the user can set the desired sorting. That sorting will be applied to the current view (+sub views) and in the "Add all to playlist" function.
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Definitely have to try this feature :D

    Thank you Albert!
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    Btw, off course, the provided sorting entries are flexible, it is very easy to add/change them. So let me know your ideas.

    Basically, each of the five media parts (Audio, Video, Images, Browse ML, Browse local) can provide its own sortings menu. But I don't make a difference between the two Browsing parts for the sorting function.

    Especially the sorting entries in the two "Browse" parts (Browse local media and Browse MediaLibrary) have to be completed. The problem here is that MP2 cannot assume a special type of media items inside views of that part because those views are based on directories where the user could store media items of different types. So the sortings in that part must be able to cope with heterogenous menu item types. The current "Default sorting" takes account for that; it applies two comparisons: First, items are sorted by item type and among items of the same type, a default comparer for that type is applied to sort the items.
    I think we should provide more sortings here for homogenous lists, for example, we should provide sortings for audio items, video items and image items, all in the same sortings menu.
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    You said it's very flexible. : What about a plugin to create personal sort orders and personal filters, based on every metadata avaliable ? (Please don't tell me "Write it", I don't feel good enough to do it ATM ;) )

    Also we can have some "Show Video Only" or "Show Audio Only" buttons in the broswing screens.

    Last, one new thing I miss at the moment is a way to sort my audio albums by release date (based on the date of the items for each album, meaning an album could be seen twice if dates are differents for some songs)
     

    Users who are viewing this thread

    Top Bottom