mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-04-23 12:05:45 -04:00
{start,end}_time_usec should be ..._time_90k
This commit is contained in:
parent
3aac88aa35
commit
b27df92cac
@ -89,13 +89,13 @@ Example response:
|
|||||||
{
|
{
|
||||||
"days": {
|
"days": {
|
||||||
"2016-05-01": {
|
"2016-05-01": {
|
||||||
"end_time_usec": 131595516000000,
|
"end_time_90k": 131595516000000,
|
||||||
"start_time_usec": 131587740000000,
|
"start_time_90k": 131587740000000,
|
||||||
"total_duration_90k": 52617609
|
"total_duration_90k": 52617609
|
||||||
},
|
},
|
||||||
"2016-05-02": {
|
"2016-05-02": {
|
||||||
"end_time_usec": 131603292000000,
|
"end_time_90k": 131603292000000,
|
||||||
"start_time_usec": 131595516000000,
|
"start_time_90k": 131595516000000,
|
||||||
"total_duration_90k": 20946022
|
"total_duration_90k": 20946022
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
10
src/web.cc
10
src/web.cc
@ -316,9 +316,9 @@ void WebInterface::HandleJsonCameraDetail(evhttp_request *req,
|
|||||||
Json::Value days(Json::objectValue);
|
Json::Value days(Json::objectValue);
|
||||||
std::string error_message;
|
std::string error_message;
|
||||||
for (const auto &day : camera_row.days) {
|
for (const auto &day : camera_row.days) {
|
||||||
int64_t start_time_usec;
|
int64_t start_time_90k;
|
||||||
int64_t end_time_usec;
|
int64_t end_time_90k;
|
||||||
if (!GetDayBounds(day.first, &start_time_usec, &end_time_usec,
|
if (!GetDayBounds(day.first, &start_time_90k, &end_time_90k,
|
||||||
&error_message)) {
|
&error_message)) {
|
||||||
return evhttp_send_error(
|
return evhttp_send_error(
|
||||||
req, HTTP_INTERNAL,
|
req, HTTP_INTERNAL,
|
||||||
@ -326,8 +326,8 @@ void WebInterface::HandleJsonCameraDetail(evhttp_request *req,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Json::Value day_val(Json::objectValue);
|
Json::Value day_val(Json::objectValue);
|
||||||
day_val["start_time_usec"] = static_cast<Json::Int64>(start_time_usec);
|
day_val["start_time_90k"] = static_cast<Json::Int64>(start_time_90k);
|
||||||
day_val["end_time_usec"] = static_cast<Json::Int64>(end_time_usec);
|
day_val["end_time_90k"] = static_cast<Json::Int64>(end_time_90k);
|
||||||
day_val["total_duration_90k"] = static_cast<Json::Int64>(day.second);
|
day_val["total_duration_90k"] = static_cast<Json::Int64>(day.second);
|
||||||
days[day.first] = day_val;
|
days[day.first] = day_val;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user