Skip to content
Snippets Groups Projects

Implements #217 cmd arg play ftl files

Merged Nicolas Pope requested to merge feature/217/termplay into master
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
@@ -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);
Loading