Ignore item only if explicitly marked as playlist. Fixes issue 2297
This commit is contained in:
parent
6d435f9276
commit
50b4f2ee93
@ -488,7 +488,7 @@ void GroovesharkService::PlaylistSongsRetrieved() {
|
||||
PlaylistInfo playlist_info = pending_retrieve_playlists_.take(reply);
|
||||
// Create playlist item
|
||||
QStandardItem* item = new QStandardItem(playlist_info.name_);
|
||||
item->setData(Type_UserPlaylist, InternetModel::Role_Type);
|
||||
item->setData(InternetModel::Type_UserPlaylist, InternetModel::Role_Type);
|
||||
item->setData(true, InternetModel::Role_CanLazyLoad);
|
||||
item->setData(InternetModel::PlayBehaviour_SingleItem, InternetModel::Role_PlayBehaviour);
|
||||
|
||||
|
@ -36,7 +36,6 @@ class GroovesharkService : public InternetService {
|
||||
|
||||
enum Type {
|
||||
Type_SearchResults = InternetModel::TypeCount,
|
||||
Type_UserPlaylist,
|
||||
Type_Track
|
||||
};
|
||||
|
||||
|
@ -207,9 +207,8 @@ QMimeData* InternetModel::mimeData(const QModelIndexList& indexes) const {
|
||||
continue;
|
||||
|
||||
last_valid_index = index;
|
||||
QUrl url = index.data(Role_Url).toUrl();
|
||||
if (url.isEmpty()) {
|
||||
// If this particular item has nothing, check if its children have something
|
||||
if (index.data(Role_Type).toInt() == Type_UserPlaylist) {
|
||||
// Get children
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
QModelIndex child = index.child(row, column);
|
||||
@ -220,7 +219,7 @@ QMimeData* InternetModel::mimeData(const QModelIndexList& indexes) const {
|
||||
}
|
||||
} else {
|
||||
new_indexes = indexes;
|
||||
urls << url;
|
||||
urls << index.data(Role_Url).toUrl();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ public:
|
||||
|
||||
enum Type {
|
||||
Type_Service = 1,
|
||||
Type_UserPlaylist,
|
||||
|
||||
TypeCount
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user