Ticket #1287: 5-musiccompare.patch
File 5-musiccompare.patch, 1.2 KB (added by , 18 years ago) |
---|
-
mythmusic/mythmusic/metadata.cpp
123 129 { 124 130 if (format == "cast") 125 131 { 126 int artist_cmp = qstrcmp (Artist(), other->Artist()); 127 int title_cmp = qstrcmp (Title(), other->Title()); 132 int artist_cmp = Artist().lower().localeAwareCompare(other->Artist().lower()); 128 133 129 134 if (artist_cmp == 0) 130 return title_cmp;135 return Title().lower().localeAwareCompare(other->Title().lower()); 131 136 132 137 return artist_cmp; 133 138 } … … 1546 1585 QString title2 = itemB->getTitle().lower(); 1547 1586 1548 1587 // Cut "the " off the front of titles 1549 title1 = (title1.lower().left(4) == thePrefix) ? title1.mid(4) : title1; 1550 title2 = (title2.lower().left(4) == thePrefix) ? title2.mid(4) : title2; 1588 if (title1.left(4) == thePrefix) 1589 title1 = title1.mid(4); 1590 if (title2.left(4) == thePrefix) 1591 title2 = title2.mid(4); 1551 1592 1552 return qstrcmp(title1,title2);1593 return title1.localeAwareCompare(title2); 1553 1594 }