1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-19 23:41:51 +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 ";
else if( artists.size() > 2 )
suffix = ", ";
else
suffix = ".";
} else {
center = summary.mid( summary.indexOf( "~" ) + 1 );
suffix = ", ";
if( i != artists.size() - 1 ) // if there are more, add an " and "
suffix += "and ";
if( i == artists.size() - 1 ) { // if there are more, add an " and "
if( !allcontrols.isEmpty() )
suffix = ", ";
else
suffix = ".";
} else
suffix += ", and ";
}
sentence += center + suffix;
}