mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 12:20:45 +02:00
Fix some more corner cases
This commit is contained in:
@@ -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 );
|
||||||
|
if( i == artists.size() - 1 ) { // if there are more, add an " and "
|
||||||
|
if( !allcontrols.isEmpty() )
|
||||||
suffix = ", ";
|
suffix = ", ";
|
||||||
if( i != artists.size() - 1 ) // if there are more, add an " and "
|
else
|
||||||
suffix += "and ";
|
suffix = ".";
|
||||||
|
} else
|
||||||
|
suffix += ", and ";
|
||||||
}
|
}
|
||||||
sentence += center + suffix;
|
sentence += center + suffix;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user