-
Notifications
You must be signed in to change notification settings - Fork 144
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
[39] Implement DELETE /api/cameras/<uuid>/<stream>/view.mp4?s=X-Y to delete whole recordings #323
[39] Implement DELETE /api/cameras/<uuid>/<stream>/view.mp4?s=X-Y to delete whole recordings #323
Conversation
…delete whole recordings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Nice surprise to get this PR. I left a few comments below.
@@ -506,6 +507,38 @@ Bugs and limitations: | |||
`hasTrailingZero` above, and | |||
[#178](https://github.com/scottlamb/moonfire-nvr/issues/178). | |||
|
|||
### `DELETE /api/cameras/<uuid>/<stream>/view.mp4` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While
DELETE /api/cameras/.../.../view.mp4
is a little strange, givenGET view.mp4
does a live transformation to MP4 to justify its name, I do like theDELETE
endpoint is guessable from theGET
endpoint.
Yeah, that name is a bit strange. The guessability is nice but hopefully not too important when we have these API docs.
My first thought is that maybe this should be a POST
to /recordings
. We also should take in the csrf
parameter for this as we do for other non-GET
stuff, and that gives us a place to put it in a similar format, and to attach more preconditions and such if desired. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
csrf
is a good callout. Will update.
Is there a sub-path of POST /api/camera/.../.../recordings/XYZ
that could work? Or POST /api/camera/.../.../XYZ
?
Ready for another pass |
…ure garbage propagates" This reverts commit 8350805.
…ing but runStartId..endId results in panics
5dbf8cc
to
0535c3a
Compare
Ran into warnings about already deleted files and panics over missing garbage. Have not resolved. |
#39
Continuous garbage collection only seems to start from
server/db/writer.rs#delete_oldest_recordings
. I don't want to delete "enough old recordings to be within disk restrictions" without pruning the API deleted recordings first. I made theLockedDatabase::delete_recordings()
also re-initialize theSampleFileDir
s'garbage_needs_unlink
collections.While
DELETE /api/cameras/.../.../view.mp4
is a little strange, givenGET view.mp4
does a live transformation to MP4 to justify its name, I do like the DELETE endpoint is guessable from the GET endpoint.