Handle UTF-8 playlist names.
BUG:109
This commit is contained in:
committed by
craig.p.drummond@gmail.com
parent
9da2c2e9ae
commit
e4e1bbf407
@@ -62,6 +62,7 @@
|
||||
Phonon backends seem to work reliably, and there can be delays between
|
||||
pressing a button (e.g. start) and the action occuring (due to buffering?).
|
||||
To re-enable pass -DDENABLE_PHONON=ON to cmake.
|
||||
36. Handle UTF-8 playlist names.
|
||||
|
||||
0.8.3.1
|
||||
-------
|
||||
|
||||
@@ -51,16 +51,15 @@ QList<Playlist> MPDParseUtils::parsePlaylists(const QByteArray &data)
|
||||
{
|
||||
QList<Playlist> playlists;
|
||||
QList<QByteArray> lines = data.split('\n');
|
||||
QList<QByteArray> tokens;
|
||||
|
||||
int amountOfLines = lines.size();
|
||||
|
||||
for (int i = 0; i < amountOfLines; i++) {
|
||||
tokens = lines.at(i).split(':');
|
||||
QList<QByteArray> tokens = lines.at(i).split(':');
|
||||
|
||||
if (tokens.at(0) == "playlist") {
|
||||
Playlist playlist;
|
||||
playlist.name = tokens.at(1).simplified();
|
||||
playlist.name = QString::fromUtf8(tokens.at(1)).simplified();
|
||||
i++;
|
||||
tokens = lines.at(i).split(':');
|
||||
|
||||
@@ -398,7 +397,6 @@ MusicLibraryItemRoot * MPDParseUtils::parseLibraryItems(const QByteArray &data)
|
||||
DirViewItemRoot * MPDParseUtils::parseDirViewItems(const QByteArray &data)
|
||||
{
|
||||
QList<QByteArray> lines = data.split('\n');
|
||||
|
||||
DirViewItemRoot * rootItem = new DirViewItemRoot;
|
||||
DirViewItem * currentDir = rootItem;
|
||||
QStringList currentDirList;
|
||||
|
||||
Reference in New Issue
Block a user