22
33#include " ../utility.hpp"
44
5+ #include " ../global_variables/program_defaults.hpp"
6+
57// #include "../recoding/detection_validator.hpp"
68// #include "../recoding/job_data.hpp"
79// #include "../recoding/video_viewer.hpp"
@@ -55,10 +57,10 @@ namespace YACCP::Executor {
5557 " The most recent job ID already has recoding data, creating a new job and copying job_config.json from previous one. \n " ;
5658 jobPath = dataPath / (" job_" + dateTime.str ());
5759 std::filesystem::create_directories (jobPath);
58- std::filesystem::copy (jobPathMostRecent / " job_data.json " , jobPath / " job_data.json " );
60+ std::filesystem::copy (jobPathMostRecent / GlobalVariables::jobDataFileName , jobPath / GlobalVariables::jobDataFileName );
5961
6062 // Load config from JSON file
61- nlohmann::json j = Utility::loadJsonFromFile (jobPath, " job_data.json " );
63+ nlohmann::json j = Utility::loadJobDataFromFile (jobPath);
6264 j.at (" config" ).get_to (fileConfig);
6365
6466 // Load config from TOML file
@@ -71,7 +73,7 @@ namespace YACCP::Executor {
7173 Config::FileConfig jsonConfig;
7274
7375 // Load config from JSON file
74- nlohmann::json j = Utility::loadJsonFromFile (jobPath, " job_data.json " );
76+ nlohmann::json j = Utility::loadJobDataFromFile (jobPath);
7577 j.at (" config" ).get_to (jsonConfig);
7678
7779 // Load config from TOML file
@@ -104,7 +106,7 @@ namespace YACCP::Executor {
104106 }
105107
106108 // Load config from JSON file
107- nlohmann::json j = Utility::loadJsonFromFile (jobPath, " job_data.json " );
109+ nlohmann::json j = Utility::loadJobDataFromFile (jobPath);
108110 j.at (" config" ).get_to (fileConfig);
109111
110112 // Load config from TOML file
@@ -239,7 +241,7 @@ namespace YACCP::Executor {
239241
240242 // Create a JSON object with all information on this job,
241243 // that includes the configured parameters in the config.toml and information about the job itself.
242- Utility::saveJsonToFile (jobPath, fileConfig, camDatas);
244+ Utility::saveJobDataToFile (jobPath, fileConfig, camDatas);
243245 }
244246 return 0 ;
245247 }
0 commit comments