package Slim::Schema::ResultSet::Age;

# $Id: Age.pm 8427 2006-07-13 23:27:00Z dsully $

use strict;
use base qw(Slim::Schema::ResultSet::Album);

use Slim::Utils::Prefs;

sub title {
	my $self = shift;

	return 'BROWSE_NEW_MUSIC';
}

sub allTitle {
	my $self = shift;

	return 'ALL_ALBUMS';
}

sub pageBarResults     { 0 }
sub alphaPageBar       { 0 }
sub ignoreArticles     { 0 }

sub browse {
	my $self = shift;
	my $find = shift;
	my $cond = shift;
	my $sort = shift;

	return $self->search($cond, {
		'order_by' => 'tracks.timestamp desc, tracks.disc, tracks.tracknum, tracks.titlesort',
		'join'     => 'tracks',
		'limit'    => (Slim::Utils::Prefs::get('browseagelimit') - 1),
	});
}

1;
