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:
parent
846b0abfca
commit
db890a54c7
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user