mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 20:04:00 +02:00
show summary for songs as well
This commit is contained in:
@@ -643,7 +643,7 @@ Tomahawk::EchonestControl::calculateSummary()
|
|||||||
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
|
summary = QString( "similar to ~%1" ).arg( m_data.second.toString() );
|
||||||
} else if( selectedType() == "Artist Description" ) {
|
} else if( selectedType() == "Artist Description" ) {
|
||||||
summary = QString( "with genre ~%1" ).arg( m_data.second.toString() );
|
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() );
|
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" ) {
|
} else if( selectedType() == "Variety" || selectedType() == "Danceability" || selectedType() == "Artist Hotttnesss" || selectedType() == "Energy" || selectedType() == "Artist Familiarity" || selectedType() == "Song Hotttnesss" ) {
|
||||||
QString modifier;
|
QString modifier;
|
||||||
|
@@ -445,10 +445,10 @@ EchonestGenerator::sentenceSummary()
|
|||||||
|
|
||||||
/// Skip empty artists
|
/// Skip empty artists
|
||||||
QList< dyncontrol_ptr > empty;
|
QList< dyncontrol_ptr > empty;
|
||||||
foreach( const dyncontrol_ptr& artist, required ) {
|
foreach( const dyncontrol_ptr& artistOrTrack, required ) {
|
||||||
QString summary = artist.dynamicCast< EchonestControl >()->summary();
|
QString summary = artistOrTrack.dynamicCast< EchonestControl >()->summary();
|
||||||
if( summary.lastIndexOf( "~" ) == summary.length() - 1 )
|
if( summary.lastIndexOf( "~" ) == summary.length() - 1 )
|
||||||
empty << artist;
|
empty << artistOrTrack;
|
||||||
}
|
}
|
||||||
foreach( const dyncontrol_ptr& toremove, empty ) {
|
foreach( const dyncontrol_ptr& toremove, empty ) {
|
||||||
required.removeAll( toremove );
|
required.removeAll( toremove );
|
||||||
|
Reference in New Issue
Block a user