void PlaylistItem::setText( const MetaBundle &bundle ) { for( int i = 0; i < NUM_COLUMNS; ++i ) setText( i, bundle.infoByColumn( i, true ) ); m_missing = !bundle.exists(); const int score = CollectionDB::instance()->getSongPercentage( bundle.url().path() ); if ( score ) setText( Score, QString::number( score ) ); const int playcount = CollectionDB::instance()->getPlayCount( bundle.url().path() ); if ( playcount ) setText( Playcount, QString::number( playcount ) ); else setText( Playcount, QString::number( 0 ) ); //Never played before. }