1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-16 11:04:01 +02:00

show summary for songs as well

This commit is contained in:
Leo Franchi
2011-06-05 13:55:53 -04:00
parent 297161c766
commit 7742e3091a
2 changed files with 4 additions and 4 deletions

View File

@@ -643,7 +643,7 @@ Tomahawk::EchonestControl::calculateSummary()
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
} else if( selectedType() == "Artist Description" ) {
summary = QString( "with genre ~%1" ).arg( m_data.second.toString() );
} else if( selectedType() == "Artist Description" ) {
} else if( selectedType() == "Artist Description" || selectedType() == "Song" ) {
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
} else if( selectedType() == "Variety" || selectedType() == "Danceability" || selectedType() == "Artist Hotttnesss" || selectedType() == "Energy" || selectedType() == "Artist Familiarity" || selectedType() == "Song Hotttnesss" ) {
QString modifier;

View File

@@ -445,10 +445,10 @@ EchonestGenerator::sentenceSummary()
/// Skip empty artists
QList< dyncontrol_ptr > empty;
foreach( const dyncontrol_ptr& artist, required ) {
QString summary = artist.dynamicCast< EchonestControl >()->summary();
foreach( const dyncontrol_ptr& artistOrTrack, required ) {
QString summary = artistOrTrack.dynamicCast< EchonestControl >()->summary();
if( summary.lastIndexOf( "~" ) == summary.length() - 1 )
empty << artist;
empty << artistOrTrack;
}
foreach( const dyncontrol_ptr& toremove, empty ) {
required.removeAll( toremove );