LMS-Community / slimserver

Server for Squeezebox and compatible players. This server is also called Lyrion Music Server.
https://lyrion.org
Other
1.15k stars 288 forks source link

LMS 9: New Sort Order in "New Music" section #1142

Open microrache opened 1 month ago

microrache commented 1 month ago

I just moved from LMS 8.5 to LMS 9 and have some questions/issues regarding the new sort behaviour for the "New Music" section. The changelog says:

Add new "Recently Changed" browse mode to complement the "New Music" menu. The latter is no longer based on the file's timestamp, but on the time added to the collection, as stored in the persistant track table.

Where can I set this "recently changed" mode? And is there a doc I am missing explaining the sort modes in more detail?

Let me explain my struggles:

Changing the default sort order to "added" is not ideal for me, as it leads to albums stored further back in the file system show up on top of the "New music" section (in my case albums from artists beginning with "Z"). At first I tried to help myself by shutting down LMS, opening the SQLite database manually, doing an

UPDATE tracks SET added_time = "timestamp", updated_time = "timestamp"

and starting the server again with that modified library.db file, but this had no effect on the display-order in the "New music" menu. Also, I am aware that this is not a good solution, because this update would be necessary after every "Delete database and do a complete rescan" - which is quite unpleasant.

So, my questions are:

  1. Are the sort modes configurable as the Changelog suggests? If yes, where is this setting?
  2. Just out of curiosity: Can you explain why my SQL update is not working? When I do
    SELECT a.* 
    FROM tracks AS t
    LEFT JOIN albums AS a
       ON a.id = t.album
    GROUP BY a.id
    ORDER BY t.added_time DESC
    LIMIT 100

    I get my desired new-album-list in the file-attribute-order, but LMS (which probably uses not this, but to my understanding a somehow similar SQL statement under the hood) still shows the albums in the original added-order with the Z-artist's albums being on top. Is there some cache-file I have to delete after manually editing the database? Are there some other timestamps in the database I would have to update to achieve the desired display-order being the file's MTIME attributes?

Thank you for helping and thank you so much for maintaining LMS in general.

michaelherger commented 1 month ago

Please see Settings/Player/[your player]/Extended Browse Modes.