Permalink
Browse files

WControllerPlaylist: Fix the 'loaded' function

  • Loading branch information...
3unjee committed Jun 26, 2018
1 parent 9fbb62a commit 121c180dc45666b2701f1e7b41ebfb4d4a15c8ea
Showing with 21 additions and 35 deletions.
  1. +1 −0 Sky.pro
  2. +16 −0 dist/changes/1.4.1.md
  3. +4 −35 src/SkGui/src/controllers/WControllerPlaylist.cpp
@@ -29,3 +29,4 @@ OTHER_FILES += 3rdparty.sh \
dist/changes/1.2.0.md \
dist/changes/1.3.0.md \
dist/changes/1.4.0.md \
dist/changes/1.4.1.md \
@@ -0,0 +1,16 @@
# [Changelog 1.4.1](http://omega.gg/Sky/changes/1.4.1.html)

### Previous: [Changelog 1.4.0](1.4.0.html)

# [Sky kit](http://omega.gg/Sky)
---

## SkGui

- WControllerPlaylist: Fix the 'loaded' function.


# Authors
---

- Benjamin Arnaud aka [bunjee](http://bunjee.me) | <bunjee@omega.gg>.
@@ -1629,40 +1629,6 @@ void WControllerPlaylistPrivate::onLoaded(WRemoteData * data)
return;
}
}
/*else if (backendQuery->type == WBackendNetQuery::TypeDefault && backend)
{
if (backend)
{
backend->queryFailed(*backendQuery);
queries.remove(data);
item->d_func()->setQueryDefault();
}
else
{
WBackendNetQuery nextQuery = *backendQuery;
nextQuery.type = WBackendNetQuery::TypeWeb;
if (query->type == WControllerPlaylistQuery::TypePlaylist)
{
WPlaylist * playlist = item->toPlaylist();
queries.remove(data);
getDataPlaylist(playlist, nextQuery);
}
else // if (query->type == WControllerPlaylistQuery::TypeFolder)
{
WLibraryFolder * folder = item->toFolder();
queries.remove(data);
getDataFolder(folder, nextQuery);
}
}
}*/

if (backend) backend->queryFailed(*backendQuery);

@@ -1674,7 +1640,8 @@ void WControllerPlaylistPrivate::onLoaded(WRemoteData * data)

return;
}
else if (backend == NULL && backendQuery->target == WBackendNetQuery::TargetDefault)

if (backend == NULL && backendQuery->target == WBackendNetQuery::TargetDefault)
{
queries.remove(data);

@@ -1696,6 +1663,8 @@ void WControllerPlaylistPrivate::onLoaded(WRemoteData * data)

if (query->type == WControllerPlaylistQuery::TypeTrack)
{
if (backend == NULL) qDebug("BACKEND SHOULD NOT BE NULL");

query->backend = backend;

backend->loadTrack(networkReply, *backendQuery,

0 comments on commit 121c180

Please sign in to comment.