mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
requesthandler: Move GetRecordDirectory to config
More consistency
This commit is contained in:
parent
9664f28483
commit
7b52d7e015
@ -51,6 +51,7 @@ const std::unordered_map<std::string, RequestMethodHandler> RequestHandler::_han
|
||||
{"SetVideoSettings", &RequestHandler::SetVideoSettings},
|
||||
{"GetStreamServiceSettings", &RequestHandler::GetStreamServiceSettings},
|
||||
{"SetStreamServiceSettings", &RequestHandler::SetStreamServiceSettings},
|
||||
{"GetRecordDirectory", &RequestHandler::GetRecordDirectory},
|
||||
|
||||
// Sources
|
||||
{"GetSourceActive", &RequestHandler::GetSourceActive},
|
||||
@ -157,7 +158,6 @@ const std::unordered_map<std::string, RequestMethodHandler> RequestHandler::_han
|
||||
{"ToggleRecordPause", &RequestHandler::ToggleRecordPause},
|
||||
{"PauseRecord", &RequestHandler::PauseRecord},
|
||||
{"ResumeRecord", &RequestHandler::ResumeRecord},
|
||||
{"GetRecordDirectory", &RequestHandler::GetRecordDirectory},
|
||||
|
||||
// Media Inputs
|
||||
{"GetMediaInputStatus", &RequestHandler::GetMediaInputStatus},
|
||||
|
@ -69,6 +69,7 @@ class RequestHandler {
|
||||
RequestResult SetVideoSettings(const Request&);
|
||||
RequestResult GetStreamServiceSettings(const Request&);
|
||||
RequestResult SetStreamServiceSettings(const Request&);
|
||||
RequestResult GetRecordDirectory(const Request&);
|
||||
|
||||
// Sources
|
||||
RequestResult GetSourceActive(const Request&);
|
||||
@ -175,7 +176,6 @@ class RequestHandler {
|
||||
RequestResult ToggleRecordPause(const Request&);
|
||||
RequestResult PauseRecord(const Request&);
|
||||
RequestResult ResumeRecord(const Request&);
|
||||
RequestResult GetRecordDirectory(const Request&);
|
||||
|
||||
// Media Inputs
|
||||
RequestResult GetMediaInputStatus(const Request&);
|
||||
|
@ -594,3 +594,23 @@ RequestResult RequestHandler::SetStreamServiceSettings(const Request& request)
|
||||
|
||||
return RequestResult::Success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current directory that the record output is set to.
|
||||
*
|
||||
* @responseField recordDirectory | String | Output directory
|
||||
*
|
||||
* @requestType GetRecordDirectory
|
||||
* @complexity 1
|
||||
* @rpcVersion -1
|
||||
* @initialVersion 5.0.0
|
||||
* @api requests
|
||||
* @category rconfig
|
||||
*/
|
||||
RequestResult RequestHandler::GetRecordDirectory(const Request&)
|
||||
{
|
||||
json responseData;
|
||||
responseData["recordDirectory"] = Utils::Obs::StringHelper::GetCurrentRecordOutputPath();
|
||||
|
||||
return RequestResult::Success(responseData);
|
||||
}
|
||||
|
@ -182,23 +182,3 @@ RequestResult RequestHandler::ResumeRecord(const Request&)
|
||||
|
||||
return RequestResult::Success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current directory that the record output is set to.
|
||||
*
|
||||
* @responseField recordDirectory | String | Output directory
|
||||
*
|
||||
* @requestType GetRecordDirectory
|
||||
* @complexity 1
|
||||
* @rpcVersion -1
|
||||
* @initialVersion 5.0.0
|
||||
* @api requests
|
||||
* @category record
|
||||
*/
|
||||
RequestResult RequestHandler::GetRecordDirectory(const Request&)
|
||||
{
|
||||
json responseData;
|
||||
responseData["recordDirectory"] = Utils::Obs::StringHelper::GetCurrentRecordOutputPath();
|
||||
|
||||
return RequestResult::Success(responseData);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user