Skip to content

Commit

Permalink
Add tasks back in using ScopedTask
Browse files Browse the repository at this point in the history
  • Loading branch information
999eagle authored and hatstand committed Apr 12, 2020
1 parent 38a5d18 commit ef3021d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/internet/subsonic/subsonicdynamicplaylist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ PlaylistItemList SubsonicDynamicPlaylist::Generate() {
}

PlaylistItemList SubsonicDynamicPlaylist::GenerateMoreSongs(int count) {
const int task_id =
service_->app_->task_manager()->StartTask(tr("Fetching playlist items"));
TaskManager::ScopedTask task(task_id, service_->app_->task_manager());

QUrl url = service_->BuildRequestUrl("getRandomSongs");
QNetworkAccessManager network;

Expand Down Expand Up @@ -158,6 +162,10 @@ PlaylistItemList SubsonicDynamicPlaylist::GenerateMoreSongs(int count) {
}

PlaylistItemList SubsonicDynamicPlaylist::GenerateMoreAlbums(int count) {
const int task_id =
service_->app_->task_manager()->StartTask(tr("Fetching playlist items"));
TaskManager::ScopedTask task(task_id, service_->app_->task_manager());

QUrl url = service_->BuildRequestUrl("getAlbumList");
QNetworkAccessManager network;

Expand Down

0 comments on commit ef3021d

Please sign in to comment.