Skip to content
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

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

Closed
microrache opened this issue Aug 4, 2024 · 5 comments
Closed

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

microrache opened this issue Aug 4, 2024 · 5 comments

Comments

@microrache
Copy link

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
Copy link
Member

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

@pbrekelmans
Copy link

I noticed a maybe related behavior. I routinely update my LMS installation to the latest release available
Since a few weeks all my spotty albums get listed on top of the 'New Music' section, regardless of their 'date added'. This was never the case before. Newly added local files, after this change of behavior, still appear on top though..

I am currently running:
Version: 9.0.0 - 1727189518 @ Wed Sep 25 02:56:59 UTC 2024
Operating system: Debian (Docker) - EN - utf8
Platform Architecture: x86_64-linux
Perl Version: 5.36.0 - x86_64-linux-gnu-thread-multi
Audio::Scan: 1.06
IO::Socket::SSL: 2.081
Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)

@michaelherger
Copy link
Member

I can't confirm this. I have some Spotify, then a local album, then some more online albums etc. mixed. Are you sure it's all Spotify first?

@michaelherger
Copy link
Member

Could you please update to the latest image, then run a wipe & rescan and check again? I think I've been able to reproduce what you saw and committed a change to improve the behaviour: see 691aa9c.

michaelherger referenced this issue Oct 18, 2024
…ces.

As we don't have a good "first seen" for online music, let's use the timestamp when an album was added to the user's collection on a given music service as the addition time. This should put online albums in the right place inside the New Music menu.
@pbrekelmans
Copy link

Yes! I updated to Version: 9.0.0 - 1729437396 @ Mon Oct 21 02:58:30 UTC 2024 and did a wipe and rescan.
Now it looks good, consistent with dates added for local files and spotify alike, you fixed it, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants