1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

Don't show 41 years as an age for a result if it was default set to 0.

This commit is contained in:
Leo Franchi 2011-10-12 17:24:49 -04:00
parent e2c71e7a18
commit 5cb327af38

View File

@ -189,7 +189,10 @@ TrackModel::data( const QModelIndex& index, int role ) const
break;
case Age:
return TomahawkUtils::ageToString( QDateTime::fromTime_t( query->results().first()->modificationTime() ) );
if ( query->results().first()->modificationTime() == 0 )
return QString();
else
return TomahawkUtils::ageToString( QDateTime::fromTime_t( query->results().first()->modificationTime() ) );
break;
case Year: