Incorect sort order for item ".." in VideoSort.cs (1 Viewer)

January 26, 2014
3
6
Canada Canada
MediaPortal Version: 1.6.0

Description
For some reason I have this bug on my media center and not on my PC I guess the items are ordered differently when they are retrieved from disk. The item ".." is not always the first item.

Here is the code fix:

In the file
[url]https://github.com/MediaPortal/MediaPortal-1/blob/master/mediaportal/WindowPlugins/GUIVideos/VideoSort.cs[/URL]

At line: 96, return value should be 1 instead of -1 like this:

if (item2.IsFolder && item2.Label == "..")
{
return 1; //Returning 1 means that item1 is greater than item2, it's indeed the case because we want ".." to be the very first item
}

Steps to Reproduce:
Hard to say, on my dev machine I did not have the problem with the same configuration as my media pc. I guess it depends on the order of the items before they are sorted
 
January 26, 2014
3
6
Canada Canada
Hi, reviewing the code, I noticed that there is the same problem when item2 is null, I guess it's not really a problem because there may not be null items in the list

if (item2 == null)
{
return 1; //Returning 1 means that item1 is greater than item2, it's indeed the case because we null items to be on top
}
 

mrkk

Portal Pro
June 14, 2007
51
6
42
Finland Finland
Hi,

I'm having this exact problem with 1.6

Is this fix included in 1.7 Preview or likely to appear on Final ?
 

mrkk

Portal Pro
June 14, 2007
51
6
42
Finland Finland
Any change for a dirty hotfix like dll's ?

Problem is REALLY irratating cause you can't use back button on remote to go up a folder, it just goes back to Main Menu if the ".." isn't the first item...

And sometimes it changes the location off ".."-item, it can be anywhere on long list of items...
 

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Sure, we can build a installer based on the fix in aera51 thread and if good result and no regression maybe it can go in 1.7.0 final (this bug annoying us too lol).
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom