* Add field and migration for segment size
* Store the segment size in db
* Add comment
* Add default
* Fix size parsing
* Include segment size in recordings endpoint
* Start adding storage maintainer
* Add storage maintainer and calculate average sizes
* Update comment
* Store segment and hour avg sizes per camera
* Formatting
* Keep track of total segment and hour averages
* Remove unused files
* Cleanup 2 hours of recordings at a time
* Formatting
* Fix bug
* Round segment size
* Cleanup some comments
* Handle case where segments are not deleted on initial run or is only retained segments
* Improve cleanup log
* Formatting
* Fix typo and improve logging
* Catch case where no recordings exist for camera
* Specifically define sort
* Handle edge case for cameras that only record part time
* Increase definition of part time recorder
* Remove warning about not supported storage based retention
* Add note about storage based retention to recording docs
* Add tests for storage maintenance calculation and cleanup
* Format tests
* Don't run for a camera with no recording segments
* Get size of file from cache
* Rework camera stats to be more efficient
* Remove total and other inefficencies
* Rewrite storage cleanup logic to be much more efficient
* Fix existing tests
* Fix bugs from tests
* Add another test
* Improve logging
* Formatting
* Set back correct loop time
* Update name
* Update comment
* Only include segments that have a nonzero size
* Catch case where camera has 0 nonzero segment durations
* Add test to cover zero bandwidth migration case
* Fix test
* Incorrect boolean logic
* Formatting
* Explicity re-define iterator
* Add object ratio config parameters
Issue: #2948
* Add config test for object filter ratios
Issue: #2948
* Address review comments
- Accept `ratio` default
- Rename `bounds` to `box` for consistency
- Add migration for new field
Issue: #2948
* Fix logical errors
- field migrations require default values
- `clipped` referenced the wrong index for region, since it shifted
- missed an inclusion of `ratio` for detections in `process_frames`
- revert naming `o[2]` as `box` since it is out of scope!
This has now been test-run against a video, so I believe the kinks are
worked out.
Issue: #2948
* Update contributing notes for `make`
Issue: #2948
* Fix migration
- Ensure that defaults match between Event and migration script
- Deconflict migration script number (from rebase)
Issue: #2948
* Filter objects out of ratio bounds
Issue: #2948
* Update migration file to 009
Issue: #2948
* Add sub label to model and set / delete funs
* Add migrations for sub label
* Tweaks to API and model
* Show sublabel if available
* Cleanups
* Update docs
* Show person in UI title
* Fix typo and don't fail on no json
* Transfer sub labels for in progress events
* Remove sublabel reset
* Remove person only check
* Make default null
* Update docs and formatting
* Make default null
* Make nullable in migration
* Undo null
* Update model to accept null
* Update migration to accept null
* Don't set to default values
* Remove redundant defaults and update http logic
* Only need a single route
* Enforce 20 character limit in http
* Update docs to mention 20 character limit
* Cleanup
* Separate insert and update to make sure updated values are retained when event ends
* Use insert instead of replace
* Remove redundant if and have should_update_db include clip or snapshot requirement.