Skip to content

Commit 01a7a3f

Browse files
committed
Add start_new_directory HTTP command
1 parent 2ac15dd commit 01a7a3f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Source/Utils/OpenEphysHttpServer.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,17 @@ class OpenEphysHttpServer : juce::Thread {
218218
LOGD("'default_record_engine' not specified'");
219219
}
220220

221+
try {
222+
std::string start_new_directory = request_json["start_new_directory"];
223+
LOGD("Found 'start_new_directory': ", start_new_directory);
224+
const MessageManagerLock mml;
225+
if (start_new_directory == "true")
226+
CoreServices::createNewRecordingDirectory();
227+
}
228+
catch (json::exception& e) {
229+
LOGD("'start_new_directory' not specified'");
230+
}
231+
221232
json ret;
222233
recording_info_to_json(graph_, &ret);
223234
res.set_content(ret.dump(), "application/json");

0 commit comments

Comments
 (0)