From 41ad4de6caea23c9469714bba94087e870b6edc9 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Fri, 25 Oct 2019 17:55:11 +0300 Subject: [PATCH] Load one source of ftl --- applications/reconstruct/src/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/applications/reconstruct/src/main.cpp b/applications/reconstruct/src/main.cpp index b3a4538df..b8487d5b1 100644 --- a/applications/reconstruct/src/main.cpp +++ b/applications/reconstruct/src/main.cpp @@ -102,6 +102,20 @@ static void run(ftl::Configurable *root) { net->start(); net->waitConnections(); + + // Check paths for an FTL file to load... + auto paths = (*root->get<nlohmann::json>("paths")); + for (auto &x : paths.items()) { + std::string path = x.value().get<std::string>(); + auto eix = path.find_last_of('.'); + auto ext = path.substr(eix+1); + + if (ext == "ftl") { + LOG(INFO) << "PATH TO CHECK: " << path; + root->getConfig()["sources"].push_back(nlohmann::json{{"uri",std::string("file://") + path + std::string("#0")}}); + } + } + LOG(INFO) << (*root->get<nlohmann::json>("sources")).dump(); // Create a vector of all input RGB-Depth sources auto sources = ftl::createArray<Source>(root, "sources", net); -- GitLab