diff --git a/src/Utils.cpp b/src/Utils.cpp index 840e2e31..0fe2fd8e 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -419,17 +419,13 @@ const char* Utils::GetRecordingFolder() { bool Utils::SetRecordingFolder(const char* path) { QDir dir(path); - if (!dir.exists()) + if (!dir.exists()) { dir.mkpath("."); + } config_t* profile = obs_frontend_get_profile_config(); - QString outputMode = config_get_string(profile, "Output", "Mode"); - - if (outputMode == "Advanced") { - config_set_string(profile, "AdvOut", "RecFilePath", path); - } else { - config_set_string(profile, "SimpleOutput", "FilePath", path); - } + config_set_string(profile, "AdvOut", "RecFilePath", path); + config_set_string(profile, "SimpleOutput", "FilePath", path); config_save(profile); return true; diff --git a/src/WSRequestHandler_Recording.cpp b/src/WSRequestHandler_Recording.cpp index 68bc0899..b8600935 100644 --- a/src/WSRequestHandler_Recording.cpp +++ b/src/WSRequestHandler_Recording.cpp @@ -56,8 +56,14 @@ HandlerResponse WSRequestHandler::HandleStartRecording(WSRequestHandler* req) { } /** - * Change the current recording folder. - * + * In the current profile, sets the recording folder of the Simple and Advanced + * output modes to the specified value. + * + * Please note: if `SetRecordingFolder` is called while a recording is + * in progress, the change won't be applied immediately and will be + * effective on the next recording. + * + * * @param {String} `rec-folder` Path of the recording folder. * * @api requests