From 5264a18dfab3318300be76c632dd8c6b350fb549 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 15 Feb 2025 07:56:45 -0600 Subject: [PATCH] Small fixes and docs tweaks (#16595) * don't clear url params if we're creating a new object mask * use correct threshold var in debug log * docs tweak for mjpeg cameras --- docs/docs/configuration/camera_specific.md | 4 ++-- .../data_processing/real_time/license_plate_processor.py | 2 +- web/src/pages/Settings.tsx | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/docs/configuration/camera_specific.md b/docs/docs/configuration/camera_specific.md index ab5e605d2..fb4ce5714 100644 --- a/docs/docs/configuration/camera_specific.md +++ b/docs/docs/configuration/camera_specific.md @@ -22,7 +22,7 @@ Note that mjpeg cameras require encoding the video into h264 for recording, and ```yaml go2rtc: streams: - mjpeg_cam: "ffmpeg:{your_mjpeg_stream_url}#video=h264#hardware" # <- use hardware acceleration to create an h264 stream usable for other components. + mjpeg_cam: "ffmpeg:http://your_mjpeg_stream_url#video=h264#hardware" # <- use hardware acceleration to create an h264 stream usable for other components. cameras: ... @@ -85,7 +85,7 @@ This camera is H.265 only. To be able to play clips on some devices (like MacOs cameras: annkec800: # <------ Name the camera ffmpeg: - apple_compatibility: true # <- Adds compatibility with MacOS and iPhone + apple_compatibility: true # <- Adds compatibility with MacOS and iPhone output_args: record: preset-record-generic-audio-aac diff --git a/frigate/data_processing/real_time/license_plate_processor.py b/frigate/data_processing/real_time/license_plate_processor.py index b0c4e2461..2d64e5cdb 100644 --- a/frigate/data_processing/real_time/license_plate_processor.py +++ b/frigate/data_processing/real_time/license_plate_processor.py @@ -1062,7 +1062,7 @@ class LicensePlateProcessor(RealTimeProcessorApi): # Check against minimum confidence threshold if avg_confidence < self.lpr_config.recognition_threshold: logger.debug( - f"Average confidence {avg_confidence} is less than threshold ({self.lpr_config.threshold})" + f"Average confidence {avg_confidence} is less than threshold ({self.lpr_config.recognition_threshold})" ) return diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx index 0fcc0414e..fbf31a00a 100644 --- a/web/src/pages/Settings.tsx +++ b/web/src/pages/Settings.tsx @@ -38,6 +38,7 @@ import NotificationView from "@/views/settings/NotificationsSettingsView"; import SearchSettingsView from "@/views/settings/SearchSettingsView"; import UiSettingsView from "@/views/settings/UiSettingsView"; import { useSearchEffect } from "@/hooks/use-overlay-state"; +import { useSearchParams } from "react-router-dom"; const allSettingsViews = [ "UI settings", @@ -58,6 +59,8 @@ export default function Settings() { const { data: config } = useSWR("config"); + const [searchParams] = useSearchParams(); + // available settings views const settingsViews = useMemo(() => { @@ -124,7 +127,8 @@ export default function Settings() { if (allSettingsViews.includes(page as SettingsType)) { setPage(page as SettingsType); } - return false; + // don't clear url params if we're creating a new object mask + return !searchParams.has("object_mask"); }); useSearchEffect("camera", (camera: string) => { @@ -132,7 +136,8 @@ export default function Settings() { if (cameraNames.includes(camera)) { setSelectedCamera(camera); } - return false; + // don't clear url params if we're creating a new object mask + return !searchParams.has("object_mask"); }); useEffect(() => {