1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 09:49: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 9aa6e2a338
commit 189e3ea348

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: