Bug 10775 - Change in how New Music is determined
: Change in how New Music is determined
Status: RESOLVED DUPLICATE of bug 1330
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 7.3.1
: All All
: -- enhancement with 1 vote (vote)
: Future
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-20 11:01 UTC by Dan Evans
Modified: 2009-11-02 13:04 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Evans 2009-01-20 11:01:07 UTC
(sent in from a customer to comments@slim.)

To me the listing in ´new music´ isn´t very logical. This is based on the mtime so in general the the creation time of the files. What I was interested in was music recently added to the library. I.e. I like to be aware of new music my girlfriend adds. In order to do this I created a few changes to squeezecenter.

First I added a column to the database:

alter table tracks add date_inserted timestamp default current_timestamp after extid;

Second I edited /usr/share/perl5/Slim/Schema/ResultSet/Age.pm:

and changed line 33 to:

'order_by' => 'tracks.date_inserted desc, tracks.disc, tracks.tracknum, tracks.titlesort',

I would be nice if this could be implemented in the main product. But I can understand that the current way of working is a design decision and people like the current way better.

This changes are made to squeezecenter 7.3.1 from the debian/ubuntu repository.
Comment 1 Chris Owens 2009-01-26 09:28:46 UTC
Dan we need an email address for clarification.

In general this is a great idea, but some cases will need improvement.
Comment 2 Chris Owens 2009-01-27 11:37:47 UTC
The case in need of improvement is what happens to all the users with existing libraries.

Further email from the original correspondent:

Regarding existing music libraries. The date could be set to the
current date. Which should always be older than music added after that
 :) 

But if you do a "update tracks set date_inserted = now()"  or
something along that line after the alter table statement you should
be fine.

My only problem is that my update doesn't work on the controller
itself. Apparently the controller doesn't ask slimserver for new music
in the same way as the webinterface does it. A pointer to how I could
do this would be appreciated.
Comment 3 James Richardson 2009-02-04 08:54:15 UTC
*** Bug 10952 has been marked as a duplicate of this bug. ***
Comment 4 James Richardson 2009-02-04 08:55:19 UTC
is Bug 1330 related to this request?
Comment 5 Sjoerd Tromp 2009-02-04 09:01:59 UTC
It's related in the sense that both requests are to change the way new music is determined. The difference is the approach how to solve it. In bugid: 1330 it's suggested to use CTIME instead of MTIME. This would maybe solve some problems. But still copied music with an older CTIME would not show up. In my opinion the only new music is music added newly to the library. So the library should keep track of the timestamp a audiofile is added. (easily done with a auto updating datetime datatype). And the select should order on a different column. As described in the origional bug comment. 


The only problem I have, is that I don't know how to control the way the controller determines the new music order. It appears not to use Age.PM. If somebody could clarify this for me I would maybe be able to at least fix it for myself.

Comment 6 James Richardson 2009-05-26 10:47:21 UTC
*** Bug 12145 has been marked as a duplicate of this bug. ***
Comment 7 James Richardson 2009-11-02 13:04:00 UTC

*** This bug has been marked as a duplicate of bug 1330 ***