mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-05 19:41:15 +03:00
improve error parsing and increase skip default
This commit is contained in:
parent
08be019bed
commit
c2d1583397
@ -42,9 +42,9 @@ class MotionSearchRequest(BaseModel):
|
|||||||
description="Minimum change area as a percentage of the ROI",
|
description="Minimum change area as a percentage of the ROI",
|
||||||
)
|
)
|
||||||
frame_skip: int = Field(
|
frame_skip: int = Field(
|
||||||
default=5,
|
default=30,
|
||||||
ge=1,
|
ge=1,
|
||||||
le=30,
|
le=120,
|
||||||
description="Process every Nth frame (1=all frames, 5=every 5th frame)",
|
description="Process every Nth frame (1=all frames, 5=every 5th frame)",
|
||||||
)
|
)
|
||||||
parallel: bool = Field(
|
parallel: bool = Field(
|
||||||
|
|||||||
@ -146,7 +146,7 @@ export default function MotionSearchView({
|
|||||||
const [parallelMode, setParallelMode] = useState(false);
|
const [parallelMode, setParallelMode] = useState(false);
|
||||||
const [threshold, setThreshold] = useState(30);
|
const [threshold, setThreshold] = useState(30);
|
||||||
const [minArea, setMinArea] = useState(20);
|
const [minArea, setMinArea] = useState(20);
|
||||||
const [frameSkip, setFrameSkip] = useState(10);
|
const [frameSkip, setFrameSkip] = useState(30);
|
||||||
const [maxResults, setMaxResults] = useState(25);
|
const [maxResults, setMaxResults] = useState(25);
|
||||||
|
|
||||||
// Job state
|
// Job state
|
||||||
@ -846,7 +846,13 @@ export default function MotionSearchView({
|
|||||||
responseData.errors;
|
responseData.errors;
|
||||||
|
|
||||||
if (Array.isArray(apiMessage)) {
|
if (Array.isArray(apiMessage)) {
|
||||||
errorMessage = apiMessage.join(", ");
|
errorMessage = apiMessage
|
||||||
|
.map((item) =>
|
||||||
|
typeof item === "string"
|
||||||
|
? item
|
||||||
|
: ((item as { msg?: string })?.msg ?? JSON.stringify(item)),
|
||||||
|
)
|
||||||
|
.join(", ");
|
||||||
} else if (typeof apiMessage === "string") {
|
} else if (typeof apiMessage === "string") {
|
||||||
errorMessage = apiMessage;
|
errorMessage = apiMessage;
|
||||||
} else if (apiMessage) {
|
} else if (apiMessage) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user