Incorrect default sort order
#16
@sba923 I don't think you are experiencing a bug, but simply limitations in how Kodi was designed to work. Where you are using uPNP I can not help you at all, it is not something I have used personally or have any insight to any way in which Kodi may not may not be intended to work with it. It is not mainstream use, and I do not know any dev that has an interest in uPNP and music.

As for raising an issue on Github there is no need for you to try and pont at the related code to do that. What is needed is a clear and detailed description of how to reproduce the behaviour you believe is problematic, so that anyone could repeat it.
 
Quote:So, with my user hat on, I consider that if the UI says "Sort by: Track, Sort: Ascending" then sorting must be done by "Track" not by "Name."
Well you also have to remember that the UI is also succinct - sort by track actually an abbreviation for "sort by the string created when the default track naming template is applied to the data for that song".

Sorry @black_eagle I feel no urge to try explaining Smile
Reply
#17
(2020-05-09, 14:01)black_eagle Wrote: It's only set to SortByLabel the first time the view is opened.  Any alteration to the view (that a user has made) will be loaded by line 557, overriding the earlier default settings.  Anytime you change the default sorting rules in the sideblade they are saved into a database along with the (internal) path to the items you are viewing.  This means that when you open a view, the defaults get set up and then the database is checked for that path and if there is a match, the defaults are overridden by the order, sort by etc for that path.  If the path doesn't exist the defaults are used.

@DaveBlake may be able to explain it better than me.

I can't help but considering that setting the sort order to SortByLabel the first time the view is opened while showing (in the menu) that the sort order is "by track" is wrong  Tongue

In addition to fixing that inconsistency (most likely: what's shown in the menu should always reflect what's currently in effect), I'm thinking of two possibilities:
- make the default sort order configurable: the user would then be able to choose between SortByLabel and SortByTrack
- change the default sort order to SortByTrack so that the default order matches the default setting in the menu

What do you think?
Reply
#18
(2020-05-09, 18:51)DaveBlake Wrote: @sba923 I don't think you are experiencing a bug, but simply limitations in how Kodi was designed to work. Where you are using uPNP I can not help you at all, it is not something I have used personally or have any insight to any way in which Kodi may not may not be intended to work with it. It is not mainstream use, and I do not know any dev that has an interest in uPNP and music.

As for raising an issue on Github there is no need for you to try and pont at the related code to do that. What is needed is a clear and detailed description of how to reproduce the behaviour you believe is problematic, so that anyone could repeat it.
 
Quote:So, with my user hat on, I consider that if the UI says "Sort by: Track, Sort: Ascending" then sorting must be done by "Track" not by "Name."
Well you also have to remember that the UI is also succinct - sort by track actually an abbreviation for "sort by the string created when the default track naming template is applied to the data for that song".

Sorry @black_eagle I feel no urge to try explaining Smile 

I don't understand why the way the UI sorts the items / the menu where the user configures the sort order [for the current view, and remembered on a per-view basis] would have any relationship with where the items come from (local music db, radio station plugin, UPnP...)

I will cook a repro case and open a GitHub issue for that inconsistency, and maybe other issues for possible improvements to the sorting experience.

I disagree with your abbreviation description: in the menu where one configures the sorting order, there are two choices: "Track" that does sort by track number, independently from the track naming template, and "Name", that sorts by label, i.e. according to whatever the track naming template is set to.
Reply
#19
(2020-05-15, 09:09)sba923 Wrote: I don't understand why...
"Why?" is alway a question with 2 different connotations
a) what is the cause of this, what in the past has lead to this outcome?
b) what is the purpose of this, what future aim does this aspire to achieve?

To answer a) I suggest you search through blame on github, read any PRs that changed this area of code etc. It is what I have to do when I wonder why Kodi is doing different things to what I might expect. Newer things there could be someone around that worked on it, but with old fundamentals like sorting it has just been this way for so long no one here now will know.

To answer b), well with a formal project that starts with a set of written requirements that the software has to implement I would be able to point back to that. But of course as an open source project with a long history and many contributors over time, that started as a "hobby" to make the original Xbox into a media player, Kodi does not have a formal set of requirements, or even an informal one. It is organic, built and adapted layer upon layer over year, and like most things that evolve it has flaws and oddities and things that make you think "WTF why is it doing that?"

There are all kinds of things you can look at and say that is crazy, makes no sense or even is plain bad design. While people will have deliberately implemented various steps (and made mistakes that you can rightly call bugs and have some hope of beimg addressed) the overall outcome often does not have the agency behind it that many users expect. "Why did you make Kodi do that?" they ask directed at a "you" that does not exist. Much harder to be sure that the outcome is a bug, it is more just a consequnce.

(2020-05-15, 09:09)sba923 Wrote: ...would have any relationship with where the items come from (local music db, radio station plugin, UPnP...)
Assuming this is a b) kind of "why?", you are thinking in a requirements upfront way, and no, no one would purposefully design these things to be sorted differently. No justification intended by this reply. Answering as a) kind of "why?", uPnP was implemented much later than the rest, and radio/pulgins also bolted on to the original local music feature. That feature growth has lead to diversity of behaviour that is not easy to untangle.

Or maybe you were being rhetorical...

(2020-05-15, 09:09)sba923 Wrote: I will cook a repro case and open a GitHub issue for that inconsistency, and maybe other issues for possible improvements to the sorting experience.
Sure, I will leave others to triage it as they see fit. Requests for improvements, new features etc., are not handled using the Github issue system, and are redirected back to the forum. Remember Kodi is FOSS, totally dependant on volunteers to pick up and work on things they find interesting and have the skills to handle. All issues and feature/change requests are directed to the wider community. The small dev team will do their best (because we care enough about Kodi to put our time and energy into it for free) to focus on priority (crash and burn) type bugs, but there are no guarantees about anything.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Incorrect default sort order00
This forum uses Lukasz Tkacz MyBB addons.