Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #15465

Merged
merged 5 commits into from
Dec 12, 2024
Merged

Fixes #15465

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frigate/events/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ def expire_clips(self) -> list[str]:

events_to_update = []

for batch in query.iterator():
events_to_update.extend([event.id for event in batch])
for event in query.iterator():
events_to_update.append(event)

if len(events_to_update) >= CHUNK_SIZE:
logger.debug(
f"Updating {update_params} for {len(events_to_update)} events"
Expand Down
3 changes: 2 additions & 1 deletion web/src/hooks/use-overlay-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { usePersistence } from "./use-persistence";
export function useOverlayState<S>(
key: string,
defaultValue: S | undefined = undefined,
preserveSearch: boolean = true,
): [S | undefined, (value: S, replace?: boolean) => void] {
const location = useLocation();
const navigate = useNavigate();
Expand All @@ -15,7 +16,7 @@ export function useOverlayState<S>(
(value: S, replace: boolean = false) => {
const newLocationState = { ...currentLocationState };
newLocationState[key] = value;
navigate(location.pathname + location.search, {
navigate(location.pathname + (preserveSearch ? location.search : ""), {
state: newLocationState,
replace,
});
Expand Down
7 changes: 5 additions & 2 deletions web/src/pages/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ export default function Events() {

const [showReviewed, setShowReviewed] = usePersistence("showReviewed", false);

const [recording, setRecording] =
useOverlayState<RecordingStartingPoint>("recording");
const [recording, setRecording] = useOverlayState<RecordingStartingPoint>(
"recording",
undefined,
false,
);

useSearchEffect("id", (reviewId: string) => {
axios
Expand Down
Loading