Skip to content

Commit f3a568b

Browse files
committed
Attempt to fix uploaded score flagging
1 parent d6742c2 commit f3a568b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/DownloadManager.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,14 +684,18 @@ void DownloadManager::UploadScore(HighScore* hs)
684684
auto errors = j["errors"];
685685
bool delay = false;
686686
for (auto error : errors) {
687-
if (error["status"] == 22) {
687+
int status = error["status"];
688+
if (status == 22) {
688689
delay = true;
689690
DLMAN->StartSession(DLMAN->sessionUser, DLMAN->sessionPass, [hs](bool logged) {
690691
if (logged) {
691692
DLMAN->UploadScore(hs);
692693
}
693694
});
694695
}
696+
else if (status == 404 || status == 405 || status == 406) {
697+
hs->AddUploadedServer(serverURL.Get());
698+
}
695699
}
696700
if (!delay && j["data"]["type"] == "ssrResults") {
697701
hs->AddUploadedServer(serverURL.Get());
@@ -747,14 +751,18 @@ void DownloadManager::UploadScoreWithReplayData(HighScore* hs)
747751
try {
748752
auto errors = j["errors"];
749753
for (auto error : errors) {
750-
if (error["status"] == 22) {
754+
int status = error["status"];
755+
if (status == 22) {
751756
delay = true;
752757
DLMAN->StartSession(DLMAN->sessionUser, DLMAN->sessionPass, [hs](bool logged) {
753758
if (logged) {
754-
DLMAN->UploadScoreWithReplayData(hs);
759+
DLMAN->UploadScore(hs);
755760
}
756761
});
757762
}
763+
else if (status == 404 || status == 405 || status == 406) {
764+
hs->AddUploadedServer(serverURL.Get());
765+
}
758766
}
759767
}
760768
catch (exception e) {}

0 commit comments

Comments
 (0)