Only sort playlists in folders view, and place these after tracks.

Closes #1258
This commit is contained in:
Craig Drummond
2018-04-30 17:40:49 +01:00
parent f4a3326761
commit e51229d1ed
2 changed files with 13 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
-----
1. Update some translations.
2. Set Smart rules 'files added in the last days' limit to 10*365
3. Only sort playlists in folders view, and place these after tracks.
2.3.0
-----

View File

@@ -743,7 +743,18 @@ void MPDParseUtils::parseDirItems(const QByteArray &data, const QString &mpdDir,
}
}
if (Loc_Browse==loc) {
qSort(songs);
QList<Song> sngs;
QList<Song> playlists;
for (const auto &s: songs) {
if (Song::Playlist==s.type) {
playlists.append(s);
} else {
sngs.append(s);
}
}
qSort(playlists);
songs=sngs;
songs+=playlists;
}
songList+=songs;
}