1
This commit is contained in:
parent
98f84845be
commit
5cefbe6cf4
@ -226,11 +226,14 @@ static void handle_record_play_request(const nlohmann::json& req)
|
||||
data["endTime"] = seg.end_ms;
|
||||
data["duration"] = duration;
|
||||
|
||||
int index = 1;
|
||||
|
||||
// 6. 单文件列表
|
||||
nlohmann::json files = nlohmann::json::array();
|
||||
for (auto& f : seg.files)
|
||||
{
|
||||
nlohmann::json item;
|
||||
item["index"] = index++;
|
||||
item["url"] = "http://" + ip + ":" + std::to_string(http_port) + f.path;
|
||||
item["startTime"] = f.start_ms;
|
||||
item["endTime"] = f.end_ms;
|
||||
@ -252,7 +255,6 @@ static void on_mqtt_message_received(const std::string& topic, const std::string
|
||||
// 必须是 request
|
||||
if (!j.contains("type") || j["type"] != "request")
|
||||
{
|
||||
LOG_INFO("[MQTT] Ignored non-request message");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user