about summary refs log tree commit diff stats
path: root/src/tracker_config.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-06 12:24:01 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-06 12:24:01 -0400
commitd20664f90a84da691baeae5fb55bb28f409ed577 (patch)
tree6a259fb645cda39aa479849e6881e78f91924fad /src/tracker_config.cpp
parentd7212d755dca7f4fd99cf4b775cd0d372d7bcbb2 (diff)
downloadlingo-ap-tracker-d20664f90a84da691baeae5fb55bb28f409ed577.tar.gz
lingo-ap-tracker-d20664f90a84da691baeae5fb55bb28f409ed577.tar.bz2
lingo-ap-tracker-d20664f90a84da691baeae5fb55bb28f409ed577.zip
Automatically check for updates
Diffstat (limited to 'src/tracker_config.cpp')
-rw-r--r--src/tracker_config.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tracker_config.cpp b/src/tracker_config.cpp index 96bb60a..c09d241 100644 --- a/src/tracker_config.cpp +++ b/src/tracker_config.cpp
@@ -12,6 +12,8 @@ void TrackerConfig::Load() {
12 ap_server = file["ap_server"].as<std::string>(); 12 ap_server = file["ap_server"].as<std::string>();
13 ap_player = file["ap_player"].as<std::string>(); 13 ap_player = file["ap_player"].as<std::string>();
14 ap_password = file["ap_password"].as<std::string>(); 14 ap_password = file["ap_password"].as<std::string>();
15 asked_to_check_for_updates = file["asked_to_check_for_updates"].as<bool>();
16 should_check_for_updates = file["should_check_for_updates"].as<bool>();
15 } catch (const std::exception&) { 17 } catch (const std::exception&) {
16 // It's fine if the file can't be loaded. 18 // It's fine if the file can't be loaded.
17 } 19 }
@@ -22,6 +24,8 @@ void TrackerConfig::Save() {
22 output["ap_server"] = ap_server; 24 output["ap_server"] = ap_server;
23 output["ap_player"] = ap_player; 25 output["ap_player"] = ap_player;
24 output["ap_password"] = ap_password; 26 output["ap_password"] = ap_password;
27 output["asked_to_check_for_updates"] = asked_to_check_for_updates;
28 output["should_check_for_updates"] = should_check_for_updates;
25 29
26 std::ofstream filewriter(CONFIG_FILE_NAME); 30 std::ofstream filewriter(CONFIG_FILE_NAME);
27 filewriter << output; 31 filewriter << output;