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

Fix some more corner cases

This commit is contained in:
Leo Franchi
2011-01-29 11:36:03 -05:00
parent 846b0abfca
commit db890a54c7

View File

@@ -316,11 +316,17 @@ EchonestGenerator::sentenceSummary()
suffix = " and "; suffix = " and ";
else if( artists.size() > 2 ) else if( artists.size() > 2 )
suffix = ", "; suffix = ", ";
else
suffix = ".";
} else { } else {
center = summary.mid( summary.indexOf( "~" ) + 1 ); center = summary.mid( summary.indexOf( "~" ) + 1 );
suffix = ", "; if( i == artists.size() - 1 ) { // if there are more, add an " and "
if( i != artists.size() - 1 ) // if there are more, add an " and " if( !allcontrols.isEmpty() )
suffix += "and "; suffix = ", ";
else
suffix = ".";
} else
suffix += ", and ";
} }
sentence += center + suffix; sentence += center + suffix;
} }