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
#20
Hi, @sba923 and everybody else Smile

I think I have an issue related to the same cause.

I have a UPnP server for my music (MediaMonkey Windows), and a playlist on it I sorted by track added ("added" to the MediaMonkey library).

When I access this UPnP source from Kodi, I can't have my default sorting (by track added).

I tried with other UPnP clients: MediaMonkey Android and VLC Android: and both display good default sorting.

Do you have any solution or workaround?

Thanks
Reply
#21
(2023-06-23, 15:15)nonob Wrote: Hi, @sba923 and everybody else Smile

I think I have an issue related to the same cause.

I have a UPnP server for my music (MediaMonkey Windows), and a playlist on it I sorted by track added ("added" to the MediaMonkey library).

When I access this UPnP source from Kodi, I can't have my default sorting (by track added).

I tried with other UPnP clients: MediaMonkey Android and VLC Android: and both display good default sorting.

Do you have any solution or workaround?

Kodi sort methods are typically defined by a combination of the skin, the media server, the media type and the Kodi client.  If you want to try my Mezzmo Kodi addon, it has support for many UPnP servers although I've never tested MediaMonkey.    I checked and right now it doesn't offer sort by track (since I control that from a Mezzmo server) but if the client works for you I can easily add a sort by track option for UPnP browser support.  It's an additional 1 line of code.  Note for non-Windows UPnP support you need to disable Only Show Mezzmo Servers in the addon settings.  If you see some of your metadata missing let me know.  Every UPnP server does things slightly differently and I sometimes have to add some additional XML parsing for certain UPnP servers. 


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#22
Hi,

I'm not sure I want to install an add-on for that, but thanks for the tip, I tried to install the add-on: plugin.video.mezzmo-kodi19-v2.1.9.0.zip.
It doesn't find my MediaMonkey UPnP server, even if I disable the option "only Mezzmo server".

Am I doing something wrong?
Reply
#23
(2023-06-24, 10:56)nonob Wrote: Hi,

I'm not sure I want to install an add-on for that, but thanks for the tip, I tried to install the add-on: plugin.video.mezzmo-kodi19-v2.1.9.0.zip.
It doesn't find my MediaMonkey UPnP server, even if I disable the option "only Mezzmo server".

Am I doing something wrong?

It sounds like MediaMonkey isn't responding properly to the normal UPnP SSDP discovery process.  I looked at their documentation and the services page should be at: 

http://192.168.1.2:4000/DeviceDescription.xml

Can you try this from your browser, with your MediaMonkey server IP address ?  You should get a bunch of XML stuff back from your server.  If this works, I can add this as another manual UPnP server capability which bypasses the discovery process.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#24
Hi,

It works (open in my browser) when I use my server port 52372 instead of 4000.

Thanks
Reply
#25
(2023-06-26, 10:58)nonob Wrote: Hi,

It works (open in my browser) when I use my server port 52372 instead of 4000.

Thanks

Great.  I just checked and Plex uses the same services description URL.  So try adding a manual entry selecting Plex as the server type but overriding with your server IP and port address.  That should allow you to see your server and browse content.  If that works I'll post a test release adding MediaMonkey as a server type and adding the sort by track option for music.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#26
(2023-06-26, 10:58)nonob Wrote: Hi,

It works (open in my browser) when I use my server port 52372 instead of 4000.

Thanks


I had a few minutes and posted a test release which has the two updates mentioned above.  If you want to give it a try and let me know.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#27
Hi,

I tried with the test release: MediaMonkey server is found 👍 and tracks of my "last added" playlist are displayed in the good sorting 👍, thanks a lot 🙂
but, unlike Kodi's native mode :
  • When I Press P on the list name, playback doesn't start (also the same contextual menu C is limited)
  • There isn't a current reading playlist view :
Image
  • When I press P on a track, Kodi goes to full screen "Playing..." screen (instead of stay on the actual screen)
  • In full screen "Playling..." mode, when I display player buttons (M), there aren't previous, next, and playlist buttons :
Image

Thanks again Smile
Reply
#28
(2023-06-28, 08:59)nonob Wrote: Hi,

I tried with the test release: MediaMonkey server is found 👍 and tracks of my "last added" playlist are displayed in the good sorting 👍, thanks a lot 🙂
but, unlike Kodi's native mode :
  • When I Press P on the list name, playback doesn't start (also the same contextual menu C is limited)
  • There isn't a current reading playlist view :
  • When I press P on a track, Kodi goes to full screen "Playing..." screen (instead of stay on the actual screen)
  • In full screen "Playling..." mode, when I display player buttons (M), there aren't previous, next, and playlist buttons :
Image

Thanks again Smile

Thanks for the confirmation that the addon is working now with MediaMonkey.  As for the behavior differences this appears to be due to how Kodi plays native content vs. how it plays lisitems, which is how the addon passes content to Kodi.  Listitems are handled as individual tracks, even though they are part of a list.  I notice that even a play from here isn't translated as a playlist by Kodi.  One way I could fix this is create my own play from here context menu item which would create a Kodi playlist, pass it to the Kodi player and that would restore the next/previous track buttons.  I've done some basic testing and that works but has some other side effects.  I'll give some thought to adding that as another context menu item.   

The button differences are again Kodi differences.  You might be able to alter this with the keymap editor addon.  For the missing context menu items, I am curious what specific ones you see missing ?  I suspect they may be due to the differences between a lisitem (i.e. single track playback vs. a playlist) or possibly due to missing metadata that might trigger an additional context menu item.   Since I haven't tested MediaMonkey yet, it is quite possible some metadata items are mapped differently in XMl and that will take a bit of coding and debugging to fix.  I just tested with Plex and see all of the normal context menu items and of course Mezzmo will always have the richest set of context menu items due to the tight integration.  Let me know which context menu items are missing and that should provide me a clue.  If you want to continue using the addon with MediaMonkey I can load up a version and do more testing, when time permits.


Thanks,

jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#29
(2023-06-28, 08:59)nonob Wrote: I tried with the test release: MediaMonkey server is found 👍 and tracks of my "last added" playlist are displayed in the good sorting 👍, thanks a lot 🙂

I got MediaMonkey loaded on my test server and connected to the Mezzmo Kodi addon.  I was able to autodiscover it without adding it manually.  I also did some testing to look at metadata responses from MediaMonkey.  All looked good except the track numbers.  It uses a different XML tag so I have updated the Mezzmo Kodi addon to account for that.    I suspect you aren't see the track numbers for your albums.

If you want to give it a try and let me know.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#30
Hi,

Here are the differences I'm talking about in the context menu:

The context menu on a playlist with default Kodi UPnP:
Image
I mostly use "Play" when I don't need to display the list, but often I just press P to start playback.

With Mezzmo, I don't have any of these standard actions in the context menu of my playlists:
Image

and if I press P, the list is opened instead of playing.

Regarding the missing buttons (previous, next, playlist), I think that everything is indeed linked to the fact that the launch of the playback of a track:
With Kodi UPnP default, a playlist is automatically created while Mezzmo does not.

Basically, here's how I'd like to use my MediaMonkey Latest Added playlist through Kodi:
  1. Have the option to simply press P on its name to start playback, or start playing the first track and have the others added to the Kodi current playlist
  2. Stay on the current screen (do not automatically go to full-screen playback mode which Mezzmo does unlike Kodi which stays on the current screen)
  3. Having the ability to go to Kodi's current playlist (side menu: playing list) for particular uses the "Playing" view type (with album art selected on the left and playing on the right)
But it's already great what you did because I can now listen to the titles of my last additions list in the order of addition to MediaMonkey, again thank you very much for that Smile

For the track numbers, indeed they are missing. I tried with your updated Mezzmo Kodi addon but I still don't see them (I just went to your link and clicked Code: Download zip, is that right?)
Reply

Logout Mark Read Team Forum Stats Members Help
Incorrect default sort order0