Bug 1330 - new music should work on creation date
: new music should work on creation date
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Audio
: 6.0.0
: PC Windows XP
: P2 enhancement with 19 votes (vote)
: Future
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-07 08:54 UTC by Chris Brooking
Modified: 2012-03-10 06:33 UTC (History)
8 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Brooking 2005-04-07 08:54:12 UTC
The new music section appears to work on the modified date of a file, rather 
than the created date.  It would be nice to have the option to specify that it 
work on the latter (as otherwise, editing a tag moves items to the top of this 
list).
Comment 1 KDF 2005-04-07 11:33:37 UTC
*** Bug 1332 has been marked as a duplicate of this bug. ***
Comment 2 Scott Bennett 2005-04-08 09:55:22 UTC
At the risk of adding more options to the interface, it would also be nice to
have an option to specify how far back to go to define something as "new". I
have a "new music" smart playlist in itunes, and I use 30 days. I can't really
tell what SS is using. Some of my albums currently listed under "New Music"
haven't been added (or even edited) for at least 6 months.
Comment 3 KDF 2005-04-08 09:57:46 UTC
there is a setting in server settings->behaviour called "new music limit" which
simply sets the number of items to show.
Comment 4 Dan Sully 2005-04-11 14:36:35 UTC
This will require a change to the db schema - as we don't currently keep track
of ctime.
Comment 5 Mark Harding 2008-04-07 06:18:12 UTC
I strongly agree that New Music should reflect creation time and not modification time.  'New Music' is useless as it stands.
Comment 6 Philip Meyer 2008-04-07 11:51:19 UTC
Erland's third-party plugins support "new music only" browse menus.  It's fairly easy to configure "New Albums" and "New Artists", that don't include updated music.
Comment 7 James Richardson 2009-11-02 13:04:00 UTC
*** Bug 10775 has been marked as a duplicate of this bug. ***
Comment 8 Andy Grundman 2009-11-02 15:57:55 UTC
I want this too, I'll add it for 7.5.  I will also add a pref to the My Music tab with the following choices:

Sort new music using:

Date modified (sorts by mtime, default)
Date created (sorts by ctime desc)
Date added (sorts by track id desc)
Comment 9 Jim McAtee 2009-11-03 20:09:33 UTC
(In reply to comment #8)
> Sort new music using:
> 
> Date modified (sorts by mtime, default)
> Date created (sorts by ctime desc)
> Date added (sorts by track id desc)

Date added would use the 'id' column in tracks_persistent, I presume?  There's an integer 'added' column in that table... is it for something else, or does it just go away? 

I thought that from past discussions, ctime isn't present in all file systems.  Would you just fall back to mtime in that case?  What if you have a mixture of tracks both with and without ctime?
Comment 10 Andy Grundman 2009-11-04 05:35:51 UTC
You're right there is an added column, that might be better.

And ctime should exist on all filesystems I think, if not then yeah, fallback to mtime.
Comment 11 Erland Isaksson 2009-11-10 11:03:42 UTC
The purpose of the "added" column is that we don't want it to be changed, it should just be set the first time a track is added to the library. This is how it was implemented initially, I'm not sure if it has changed since then.

Since it's only set the first time it doesn't really matter if it's set by using the ctime or mtime, in most cases they are going to be approximately the same the first time a track is scanned with Squeezebox Server.
Comment 12 Jim McAtee 2009-11-10 12:00:20 UTC
(In reply to comment #11)
> Since it's only set the first time it doesn't really matter if it's set by
> using the ctime or mtime, in most cases they are going to be approximately the
> same the first time a track is scanned with Squeezebox Server.

You wouldn't store ctime or mtime in the added column.  You'd just store now() when the track is first scanned.
Comment 13 Digital Mitch 2009-12-03 01:45:53 UTC
not sure whether the solution will be via "added" or otherwise.

agree mtime and ctime probably don't matter in the process of adding new tracks to an existing library, but if a library has to be recreated from scratch then ctime should be the first choice to populate, falling back to mtime.
Comment 14 Chris Owens 2010-03-08 11:17:20 UTC
Moving P3 and lower bugs to next release target
Comment 15 Andy Grundman 2011-01-14 13:00:12 UTC
Oops, meant to move that to 7.6.
Comment 16 Andy Grundman 2011-01-14 13:07:02 UTC
*** Bug 12145 has been marked as a duplicate of this bug. ***
Comment 17 Martin Whitehead 2011-01-15 00:02:49 UTC
I see that bug 12145 has been marked as a duplicate of this bug (1330).

But I don't see in the bug 1330 documentation, any explicit inclusion of the 12145 requirement that when an album is continually added to, over a period of weeks or months, it's desirable that the album be seen as having a time equal to the most recent track added.

If it does indeed include this requirement, I'd happily stand corrected!
Comment 18 Sébastien Phélep 2011-02-05 15:01:39 UTC
(In reply to comment #12)
> You wouldn't store ctime or mtime in the added column.  You'd just store now()
> when the track is first scanned.

That's the way to go.

Windows may be storing a file's creation time in ctime, but most other POSIX-compliant systems use ctime to store the file's inode change time (i.e. changing a file's permissions or moving it will update its ctime).

I guess using something like min( ctime, mtime, now() ) would be a smart way to initialize the ctime column in the database, since it probably would prevent old tracks to appear in the new music list.

Not sure whether Windows updates mtime or not when you change one file's properties, but in case it doesn't, it should be safe to use it to track true changes (e.g. tag updates).
Comment 19 Michael Herger 2011-10-26 00:40:59 UTC
*** Bug 17697 has been marked as a duplicate of this bug. ***