-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting by "Default" (Unsorted) doesn't take effect #16370
Comments
It does work only when you re-enter the directory you set that view on. We simply "record" what you set there and set in while building the content next time - as a workaround |
I can confirm this issue |
Yes, I stuck on this issue too. Checked on
|
This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state. |
Not relevant any more on 21. Omega. |
Bug report
Describe the bug
If you change a listing in Kodi from Sort by <something> to Sort by Default (which is SORT_METHOD_UNSORTED) there is no effect on the listing.
Expected Behavior
The listing should be refreshed using the (original) Unsorted view.
Actual Behavior
Nothing happens as if it is broken.
Possible Fix
So after going through the code it appears that the original list is being sorted, and obviously once you sort that original list (and don't keep the original) it cannot be unsorted anymore. You basically lost the original order of that list.
One solution would be to keep the original list. But a more simpler solution would be to refresh the listing after Sort by Default was selected. In this case you don't need to keep the original listing, and the user does get an unsorted/original order back.
To Reproduce
Steps to reproduce the behavior:
Debuglog
A debuglog makes no sense for this issue.
Screenshots
Here is a chronological set of screenshots.
The original screen sorted by Default
![screenshot012](https://user-images.githubusercontent.com/388198/61129163-14b53800-a4b4-11e9-9c4b-76b3eddc1cd3.png)
The listing now sorted by Name
![screenshot013](https://user-images.githubusercontent.com/388198/61129184-1f6fcd00-a4b4-11e9-814e-75361b68a2d4.png)
The listing again sorted by Default
![screenshot014](https://user-images.githubusercontent.com/388198/61129194-2696db00-a4b4-11e9-989a-8e74e9b9f060.png)
You can see that the sorted by Default did not restore the original listing, you simply get the same ordering as sorted by Name. Which is strange and confusing and feels pretty much like a bug.
Additional context or screenshots (if appropriate)
A lot of addons use the Unsorted order to influence the order in a specific way that is currently not supported by Kodi. For instance the order is provided by the content provider but cannot be reproduced by any characteristic.
If you would change the order, and go back to Default (unsorted) the original order is not restored until you leave that view/listing and go back. But that is counterintuitive, most people would not understand and change the order a few times. Most likely they would not keep it to Default (unordered) so wouldn't learn refreshing the view fixes the original order. So it feels very much like a bug (even if this behaviour could be rationalized, it requires knowledge of the implementation).
Your Environment
The used Operating system is irrelevant for this issue, all are affected.
Android
iOS
Linux
OSX
Raspberry-Pi
Windows
Windows UWP
Operating system version/name: LibreELEC or Windows or Android, or...
Kodi version: 18.2 (but also previous versions)
The text was updated successfully, but these errors were encountered: