Skip to content

Commit

Permalink
Fix bancho download task task
Browse files Browse the repository at this point in the history
  • Loading branch information
KyuubiRan committed Jun 7, 2023
1 parent d932523 commit 201e201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Downloader/src/api/Bancho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ bool api::bancho::DownloadBeatmap(osu::Beatmap &bm) {
}

auto path = utils::GetCurrentDirPath() / L"downloads" / (std::to_string(bm.sid) + ".osz");
features::DownloadTask tsk = {bm};
auto *tsk = features::DownloadQueue::GetInstance().addTask(bm);
int ret = -1;
if (const CURLcode code = net::curl_download(url.c_str(), path, &tsk, &ret); code == CURLE_OK && ret == 200) {
if (const CURLcode code = net::curl_download(url.c_str(), path, tsk, &ret); code == CURLE_OK && ret == 200) {
LOGI("Success download beatmapsets: %d", bm.sid);
return true;
} else {
Expand Down

0 comments on commit 201e201

Please sign in to comment.