Sort GS MyMusic songs by names, like other playlists

This commit is contained in:
Arnaud Bienner 2012-07-21 18:47:18 +02:00
parent 9a392692dd
commit 07c7bd9bb2
1 changed files with 3 additions and 5 deletions

View File

@ -791,12 +791,10 @@ void GroovesharkService::UserLibrarySongsRetrieved(QNetworkReply* reply, int tas
QVariantMap result = ExtractResult(reply);
SongList songs = ExtractSongs(result);
Song::SortSongsListAlphabetically(&songs);
foreach (const Song& song, songs) {
QStandardItem* child = new QStandardItem(song.PrettyTitleWithArtist());
child->setData(InternetModel::Type_Track, InternetModel::Role_Type);
child->setData(QVariant::fromValue(song), InternetModel::Role_SongMetadata);
child->setData(InternetModel::PlayBehaviour_SingleItem, InternetModel::Role_PlayBehaviour);
child->setData(song.url(), InternetModel::Role_Url);
QStandardItem* child = CreateSongItem(song);
child->setData(true, InternetModel::Role_CanBeModified);
library_->appendRow(child);