frigate
frigate copied to clipboard
Multiselect to remove events
Describe what you are trying to accomplish and why in non technical terms I want to be able to select multiple events so that I can remove them at the same moment.
Describe the solution you'd like I want to keep the events for long period of time 90+ days and I want to be able to remove events which I'm not interested in (e.g. false positives, detections if someone from my family is on camera, e.g. working on backyard etc)
Describe alternatives you've considered You can manually delete them one by one but literally it takes time. I also considering to be able to turn off detections for some time e.g. 30 minutes or till sunset but it will require automation and dependencies on other software e.g. hass
Additional context It should be an easy fix :)
2nd this request. I have a test camera in my home office, and its recorded 100's of events of me just moving a little... would love to delete them all. Or is there a command that could clear all recordings and events for a particular camera?
3rd this request! I have a new Frigate setup and I am regularly using up all my storage while I tune my object detection. I would prefer not to have to remove all events every time, or buy more storage for spurious events.
Once the multi-select mechanism is in place it would be fantastic if selected events could be deleted OR archived.
I'm not an expert in snowpack and preact so I made a "dirty hack" and I'm not going to add that as a pull request. I hope someone will be able to make it in a better way. The changes are minimal so I hope it may make to the next official build.
I've added the following features:
- "has clip" filter;
- refresh page button (I didn't find a way to refresh just the table);
- (de)select all visible events;
- select events;
- delete selected events;
Known issues:
- I didn't add a new API call, so events are deleted one by one and there is no progress indicator. Depending on # of events it takes some time.
- I didn't create a nice confirmation window and used a standard javascript dialog to confirm deletion.
- has clip filter filter doesn't display correct value when applied.
- refresh button, has a wrong icon. I just reused an existing icon.
- the refresh button refreshes the whole page. It would be better to refresh just the table.
- if all events were selected/deleted. Older events may not be loaded so you will need to refresh the page.
https://github.com/Homas/frigate/commit/9ff4866f44d6670ad145104265693fc14c9c1f84
Definitely need this! Is made worse by fact you cannot locally develop (at least not for registry despatch).
You are forced into a painfully slow edit, commit, push, trigger cycle which is slow enough, and then you have to delete all those test runs (and squash your commit history)
You are forced into a painfully slow edit, commit, push, trigger cycle which is slow enough, and then you have to delete all those test runs (and squash your commit history)
What are you talking about?
duplicate of #2223 can you please make it happen ?
duplicate of #2223 can you please make it happen ?
#2223 is not a duplicate of this
#2223 : Nuke all events button this one: Ability to select multiple events in the page and delete them in one go
although this properly implemented might address the needs of #2223
Any chance this feature will make in in 0.11 ?
Any chance this feature will make in in 0.11 ?
Have you used 0.11? The deleting experience is much improved as it only takes one click to delete an event.
What you see now for delete behavior in 0.11 is what will be there in final release.
Have you used 0.11? The deleting experience is much improved as it only takes one click to delete an event. What you see now for delete behavior in 0.11 is what will be there in final release.
But there is already the possibility to select a day or a week. Sometime i just want to delete a whole day because i did testing for example. So why not add a button for "Delete all shown". So you can Filter by Day, Week, whatever and delete all events from that timeframe.
But there is already the possibility to select a day or a week. Sometime i just want to delete a whole day because i did testing for example. So why not add a button for "Delete all shown". So you can Filter by Day, Week, whatever and delete all events from that timeframe.
I wasn't suggesting that what is in 0.11 is the optimal solution or even considered a proper solution to this issue, just that it is much improved and much faster than 0.10.
In any case, what is in 0.11 is what will be there in the final 0.11 release
Just as sidenote:
Who is looking for a "emergency solution" to be able to delete all events, i just used xdotool
to quick'n'dirty automate a mouse click every second to automatically push the delete button of frigate-events (always sitting at the same spot)
#!/bin/bash
while [ 1 ]; do
xdotool click 1 &
sleep 1
done
Funny to watch and saved me, although i know that this is not a "professional soution" :sweat_smile:
Looking forward to be able to e.g. do this in frigate-gui like:
- delete all events
- delete events older than
- delete all events but exclude starred
Is there any news about this functionality?. I think this one is required for this product. Many features but this one is missing....
+1
+1
Also, I noticed that if you try to delete a starred event, the confirmation window cannot be closed without agreeing. You have to refresh the page.
+1
+1
+1
Sorry @NickM-27 for duplicating this request! Adding my request here, in addition, not sure if this would be a different request, but adding this to the Frigate+ Images interface would be the cats b-hole as well. ;)
@AMD-NICK why did you downvote the +1 above your post then +1 yourself?
Also why are people downvoting +1s (upvotes) in general. Seems odd.
@AMD-NICK why did you downvote the +1 above your post then +1 yourself?
Also why are people downvoting +1s (upvotes) in general. Seems odd.
idk, I think it was a miss click. Fixed
Adding my 'please' to this feature request. :-)
One camera in a Warehouse that only records when the security system is armed produces tens of false positives every night (hundreds over a week). Therefore, it would be great to have check-boxes and a 'Select all' to be able to quickly delete unwanted events and save storage space. (I've tried tweaking detection sizes and creating masks/zones, but the contents change and move so often it's a bit of a lost cause... or beyond my ability to tune!)
I get pages and pages of events like this:
Bump, a solution please.
I know it's not the solution we want, but I put together a little script to loop through the events and simulate a click to delete them:
const bulkDelete = async (max = Infinity, timeout = 250) => {
try {
const getEvent = async () => {
await new Promise(r => setTimeout(r, timeout));
const events = document.getElementsByClassName('flex bg-slate-100 dark:bg-slate-800 rounded cursor-pointer min-w-[330px]');
if (!events) return undefined;
if (events.length === 0) return undefined;
return events[0];
}
let event = getEvent();
let i = 1;
while (event && i <= max) {
console.log(`deleting event number ${i}`);
event.childNodes[1].childNodes[2].childNodes[0].dispatchEvent(new Event('click'));
event = await getEvent();
i = i + 1;
}
} catch (error) {
console.log('error: ', error);
}
}
And then call it like:
await bulkDelete() // note that you can setup a limit of events to delete and the ~time between clicks
bump. have hundreds id like to delete and have to do it one by one.
+1
Must be one of the most requested features and seemingly not that complex. Curious why this hasn't been implemented yet!
fwiw +1
The UI is currently being rewritten for 0.14 and multiselect to remove has been implemented, closing https://github.com/blakeblackshear/frigate/pull/10161
In the meantime, I just created a script to do this. It's not fast, but it works:
https://github.com/blakeblackshear/frigate/assets/1627178/7a981947-d490-4ba2-9dab-a8c155f05acd
You can fins this script and the instructions here. Hope you find it useful!
I was looking for this, made simple trick:
#!/bin/bash
events=$(curl -s http://localhost:5000/api/events)
echo $events | jq -c '.[]' | while read -r event; do
id=$(echo $event | jq -r '.id')
response=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE "http://localhost:5000/api/events/$id")
if [ "$response" -eq 200 ]; then
echo "Deleted event with ID: $id"
else
echo "Failed to delete event with ID: $id, Status: $response"
fi
done