Bugzilla – Bug 44
browse by new music
Last modified: 2008-08-18 10:53:01 UTC
We have a pretty big collection (200 Gb) stored at an online server. Several people have permissions to update the server with new albums. To inform each other of 'whats new' we use a mailing list. At this point I miss a feature at de slimp3 server. It would be great to have an item at the homepage under the 'browse music' heading called: 'new music' (or something like that). This link should show a list with uploaded dirs and files which are not older than a month (based on the date of each file). Perhaps this period - the month - is a variable which you change in the server settings.
I agree, with big music collections, we're all tired of the older stuff, and what I'd like is to be able to browse the music folder chronologically, newest first. Directories only need to be in Chronological order, files probably should still be in alphabetical. I believe this would answer Dean's requirements, fit in with the existing interface well and be simple to implement. When you want to look at new music, you just browse down from the top till you get to what you want.
I would *love* this feature as well, both as browsing, and as a plugin or browse mode on the actual slim/squeeze device and the web interface. i tried to do a plugin, but i don't know enough perl! i have a nice ls -t script on my box for my information, but it would be nice in the server. :)
I too desired this functionality. After a while, I decided to dig through the sources and see how hard it would be to implement. Turns out it was dead simple. Here's a patch for 5.4.0. I didn't bother to do I18N, or to add a knob to the prefs page, since it looks like 6.0 is on the way soon. However, it wouldn't be hard for me to do that if the Slim Devices folks are interested in this patch... diff -pubr ./Music/Info.pm /usr/share/slimserver/Slim/Music/Info.pm --- ./Music/Info.pm 2004-11-15 11:59:26.000000000 -0800 +++ /usr/share/slimserver/Slim/Music/Info.pm 2004-12-11 23:00:30.000000000 -0800 @@ -2108,6 +2108,20 @@ sub readTags { } } + ### + ### Special hack to create a genre of "New" for recently added files + ### + if (-M $filepath < Slim::Utils::Prefs::get('maxAgeForNew')) { + if (defined($tempCacheEntry->{'GENRE'})) { + $tempCacheEntry->{'GENRE'} .= ';New'; + } else { + $tempCacheEntry->{'GENRE'} = 'New'; + } + } + ### + ### End of "New" genre hack + ### + # cache the file size & date $tempCacheEntry->{'FS'} = -s $filepath; $tempCacheEntry->{'AGE'} = (stat($filepath))[9]; diff -pubr ./Utils/Prefs.pm /usr/share/slimserver/Slim/Utils/Prefs.pm --- ./Utils/Prefs.pm 2004-11-15 11:59:26.000000000 -0800 +++ /usr/share/slimserver/Slim/Utils/Prefs.pm 2004-12-11 23:00:15.000000000 -0800 @@ -133,6 +133,7 @@ my %DEFAULT = ( ,'showYear' => 0 ,'timeFormat' => q(|%I:%M:%S %p) ,'titleFormatWeb' => 1 + ,'maxAgeForNew' => 14 ,'iTunesplaylistprefix' => 'iTunes: ' ,'iTunesplaylistsuffix' => '' ,'MoodLogicplaylistprefix' => 'MoodLogic: '
There's now a "New Music" top level menu in the web interface for 6.0 builds.
The menu item should be accessible through the device
I've just added browsing by new music to the device UI. Subversion change 2240.