From 08de45b010eb10f77902776157ea4940f56f4511 Mon Sep 17 00:00:00 2001 From: fennec Date: Sat, 16 May 2020 17:28:51 -0500 Subject: [PATCH] stuff --- source/scenes/AppUpdateScene.cpp | 6 +++--- source/scenes/PackageDownloadScene.cpp | 10 +++++----- source/scenes/PackageSelectScene.cpp | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/scenes/AppUpdateScene.cpp b/source/scenes/AppUpdateScene.cpp index 330b6e8..f49b8ce 100755 --- a/source/scenes/AppUpdateScene.cpp +++ b/source/scenes/AppUpdateScene.cpp @@ -157,19 +157,19 @@ namespace ku::scenes { if (request == _appVersionRequest) { json_t * root = json_loads(request->response.rawResponseBody.c_str(), 0, NULL); if (!root || !json_is_array(root) || json_array_size(root) < 1) { - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again."); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[4]"); return; } json_t * release = json_array_get(root, 0); if (!release || !json_is_object(release)) { - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again."); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[5]"); return; } json_t * tagName = json_object_get(release, "tag_name"); if (!tagName || !json_is_string(tagName)) { - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again."); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[6]"); return; } diff --git a/source/scenes/PackageDownloadScene.cpp b/source/scenes/PackageDownloadScene.cpp index 11242a2..1d120ce 100755 --- a/source/scenes/PackageDownloadScene.cpp +++ b/source/scenes/PackageDownloadScene.cpp @@ -146,21 +146,21 @@ namespace ku::scenes { json_decref(root); } - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.", false); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[7]", false); return; } json_t * release = json_array_get(root, 0); if (!release || !json_is_object(release)) { json_decref(root); - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.", false); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[8]", false); return; } json_t * tagName = json_object_get(release, "tag_name"); if (!tagName || !json_is_string(tagName)) { json_decref(root); - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.", false); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[9]", false); return; } @@ -169,7 +169,7 @@ namespace ku::scenes { json_t * assets = json_object_get(release, "assets"); if (!assets || !json_is_array(assets) || json_array_size(assets) < 1) { json_decref(root); - _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.", false); + _showStatus("Unable to parse response from GitHub API.", "Please restart the app to try again.[10]", false); return; } @@ -186,7 +186,7 @@ namespace ku::scenes { } std::string assetName(json_string_value(name)); - if (assetName.compare(0, 6, "DeepSea") != 0 || assetName.compare(assetName.length() - 4, 4, ".zip") != 0) { + if (assetName.compare(0, 8, "deepsea_") != 0 || assetName.compare(assetName.length() - 4, 4, ".zip") != 0) { continue; } diff --git a/source/scenes/PackageSelectScene.cpp b/source/scenes/PackageSelectScene.cpp index 3bca29b..e2424a6 100755 --- a/source/scenes/PackageSelectScene.cpp +++ b/source/scenes/PackageSelectScene.cpp @@ -207,19 +207,19 @@ namespace ku::scenes { void PackageSelectScene::_onCompleted(WebRequest * request) { json_t * root = json_loads(request->response.rawResponseBody.c_str(), 0, NULL); if (!root || !json_is_array(root) || json_array_size(root) < 1) { - _showStatusView("Unable to parse response from GitHub API.", "Please restart the app to try again."); + _showStatusView("Unable to parse response from GitHub API.", "Please restart the app to try again.[1]"); return; } json_t * release = json_array_get(root, 0); if (!release || !json_is_object(release)) { - _showStatusView("Unable to parse response from GitHub API.", "Please restart the app to try again."); + _showStatusView("Unable to parse response from GitHub API.", "Please restart the app to try again.[2]"); return; } json_t * tagName = json_object_get(release, "tag_name"); if (!tagName || !json_is_string(tagName)) { - _showStatusView("Unable to parse response from GitHub API.", "Please restart the app to try again."); + _showStatusView("Unable to parse response from GitHub API.", "Please restart the app to try again.[3]"); return; }