Skip to content

Commit

Permalink
uploadwithreplaydata should fallback to uploadscore if there is no data
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 17, 2020
1 parent 26ad395 commit fcff5dd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Etterna/Singletons/DownloadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1081,16 +1081,22 @@ DownloadManager::UploadScoreWithReplayData(HighScore* hs)
HTTPRequests.push_back(req);
return;
}
void // not tested exhaustively -mina

// for older scores or newer scores that failed to upload using the above
// function we should probably do some refactoring of this
void
DownloadManager::UploadScoreWithReplayDataFromDisk(const string& sk,
function<void()> callback)
{
if (!LoggedIn())
return;

auto* hs = SCOREMAN->GetScoresByKey().at(sk);
// this should never be true unless we are using the manual forceupload
// functions, in which case we will defer to the scoreuploader that
// does not use replaydata
if (!hs->HasReplayData())
return;
UploadScore(hs);

CURL* curlHandle = initCURLHandle(true);
string url = serverURL.Get() + "/score";
Expand Down

0 comments on commit fcff5dd

Please sign in to comment.