Commit Graph

93 Commits

Author SHA1 Message Date
Nicolas Mowen
a1ae5b67d8
Mqtt sub labels (#3899)
* Set sub label on object data if event is in progress

* Include sub_label in dict

* Don't need to set and passively get

* Formatting

* Don't expect event to be valid

* Update docs to reflect that sub label is included
2022-10-01 09:00:56 -05:00
Nick Mowen
7e9f913ff6 Fix edge case where browser sends multiple requests to download file. 2022-09-15 06:32:54 -05:00
uvjustin
9df415b3f2
Fix VOD issues with longer keyframe intervals (#3671)
* Fix VOD issues with longer keyframe intervals

* Move probe function to util
Update comment

* Use recording duration for keyFrameDurations

* Remove unused early return

* Avoid clipping first clip
2022-08-26 06:32:34 -05:00
uvjustin
8c45dab9b8
Handle spaces in labels (#3679)
* Unquote label in flask routes
Encode label in Camera.jsx

* Don't use preprocessor

* Update nginx location for cacheable images
2022-08-25 07:32:30 -05:00
Blake Blackshear
37325c70ba fix plus enabled for addons 2022-07-22 08:12:58 -05:00
Nicolas Mowen
c2465a46a8
Http tests (#3350)
* Set up for http tests

* Setup basics for testing and first test

* Add testing consts

* Cleanup db creation

* Add one more check to test

* Get event that does not exist

* Get events working with cleaner db

* Test retain / un-retain

* Test setting and deleting sub label

* Test getting list of sub labels

* Fix bug caught in tests

* Test deleting event

* Test geting list of events

* Expand test

* Test more event filters

* Write version module so tests don't fail on version import

* Test config

* Test recordings endpoint

* Formatting

* Remove unused imports

* Test stats

* Add cleanup files in const

* Add name to match other checks
2022-06-30 07:53:46 -05:00
Nicolas Mowen
5f9d477863
Update event filters naming and add sub label filter (#3194)
* Use default names so filters are more clear

* Add endpoint to get list of sub labels inside DB

* Fix crash on no internet

* Cleanups for sub_label http

* Add sub label selector to events UI

* Add event filtering for sub label

* Formatting files

* Reduce size of filters to fit on one line

* Add handler for tests

* Remove unused imports

* Only show the sub labels filter when there are sub labels in the DB

* Fix tests

* Use distinct instead of group_by

* Formatting

* Cleanup event logic
2022-05-29 09:47:43 -05:00
Blake Blackshear
358d0521a1 fix plus active check and add logging 2022-05-12 06:29:43 -05:00
Blake Blackshear
691ed6a4c7 revamp recordings 2022-05-12 06:29:43 -05:00
Blake Blackshear
78e1782084 optimize query performance 2022-05-12 06:29:43 -05:00
Nicolas Mowen
0bd3cff13b
Set event thumbnail cache timeout to 1 day (#3150)
* Set event thumbnail cache timeout to 1 day

* Pass max age as a param and set default to 30 days
2022-04-26 19:42:07 -05:00
Blake Blackshear
91539de3ff optimize caching of image data from api 2022-04-26 06:36:26 -05:00
Sebastian Englbrecht
cafe0917c7 Typing: mypy fixes for
* __main__.py
 * app.py
 * models.py
 * plus.py
 * stats.py

In addition a new module was introduced: types
There all TypedDicts are included. Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
2022-04-17 08:55:38 -05:00
Blake Blackshear
b86b2d6602 cleanup print statements 2022-04-16 09:08:10 -05:00
Blake Blackshear
cef77fba01 add frontend for frigate+ submission 2022-04-10 09:11:16 -05:00
Blake Blackshear
e724fe3da6 add endpoint to submit to plus 2022-04-10 09:11:16 -05:00
Nicolas Mowen
b1cc64d4fa
FEAT: Ability to set sub labels for specific events (#2949)
* 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.
2022-03-17 07:18:43 -05:00
Nicolas Mowen
0abd0627df
FEAT: Replace best jpg endpoint (#2944)
* Added object thumbnail def and made camera tracked objects use it.

* Add object snapshot def

* Remove documentation for best.jpg

* Update docs for label thumbnail and snapshot defs
2022-03-11 07:56:39 -06:00
Blake Blackshear
1c9ba11e07 swr events refactor 2022-03-11 07:49:06 -06:00
Nicolas Mowen
4004048add
Ability to retain specific clips / events indefinitely (#2831) 2022-02-21 22:03:01 -06:00
Jason Hunter
340be7f86d Allow download of in progress clips 2022-02-18 21:18:26 -06:00
Jason Hunter
e433bec17f Add in progress events to recordings view 2022-02-18 21:18:26 -06:00
Blake Blackshear
4a16171f96 set has_clip to false when recordings fail 2022-02-18 21:18:26 -06:00
Blake Blackshear
4d2d11193f cleanup clean snapshots on event deletion too 2022-02-18 21:18:26 -06:00
Yuriy Sannikov
80627e4989 safe refactoring (#2552)
Co-authored-by: YS <ys@gm.com>
2022-02-18 21:18:26 -06:00
TJ Horner
9e987fdebc Change JPEG mime type (#2543) 2022-02-18 21:18:26 -06:00
Blake Blackshear
039f1a522e log error messages on vod endpoints 2022-02-18 21:18:26 -06:00
Blake Blackshear
24e2f84231 ensure duration > 0 for segments 2022-02-18 21:18:26 -06:00
Blake Blackshear
273076e7f4 don't modify ffmpeg_cmd object 2022-02-18 21:18:26 -06:00
Blake Blackshear
2f2329ba44 only save recordings when an event is in progress 2022-02-18 21:18:26 -06:00
Blake Blackshear
89e317a6bb store start/end event with pre/post capture to avoid expiring wanted recordings 2021-09-11 08:34:27 -05:00
Blake Blackshear
189b9c6648 use a nginx internal redirect 2021-08-11 06:22:26 -05:00
Jason Hunter
fc40567794 remove -f mp4 as it is not needed 2021-08-07 15:51:16 -05:00
Jason Hunter
de121008c1 fix DoesNotExist exception 2021-08-07 15:51:16 -05:00
Jason Hunter
2fbfbf614b add download option on clips and snapshots 2021-08-07 15:51:16 -05:00
Jason Hunter
5d940bcb86 optimize recording maintenance logic 2021-08-07 15:51:16 -05:00
Jason Hunter
a476bc9885 initial commit 2021-08-07 15:51:16 -05:00
Blake Blackshear
6b26fc753e include ffmpeg_cmds in config endpoint 2021-07-10 06:40:50 -05:00
Blake Blackshear
98d8118fb2 add options to define jpeg quality 2021-07-02 07:52:02 -05:00
Craig Citro
20912c12e7 Check for jpg bytes before make_response
If jpg_bytes wasn't retrieved from either desk or a tracked object, respond with 404
Prevents uncaught error for unknown event ids sent to event_snapshot endpoint
2021-06-27 08:13:14 -05:00
Craig Citro
7ddba4fc59 Prevent repeated db connect calls
Only call database.connect() if database.is_closed()
Prevents errors if _db_connect is triggered twice
2021-06-27 08:13:14 -05:00
Jason Hunter
c664bd63f6 initial conversion to pydantic 2021-06-24 06:53:05 -05:00
Blake Blackshear
cbdf2c2c71 remove gevent fixes #920 2021-06-14 07:48:35 -05:00
Patrick
e8c342e162 Update http.py
comparison of constants, use T/F instead
2021-06-10 20:58:28 -05:00
Jason Hunter
098e293c82 fetch recordings until end of hour, not top of next hour 2021-06-10 07:04:28 -05:00
Jason Hunter
78a0b5e6c9 clean up VOD endpoint 2021-06-10 07:04:28 -05:00
Jason Hunter
055bd22138 initial implementation of recordings table 2021-06-10 07:04:28 -05:00
Jason Hunter
68dfaaf767 hide recordings page if record is not enabled, show error if no recordings available. 2021-06-06 07:54:58 -05:00
Jason Hunter
b53a50cd54 restyle to match Material Design List specs 2021-06-05 07:30:18 -05:00
Jason Hunter
9822d614e2 fix videojs bug when switching cameras, support recording delay, fix navigation highlight 2021-06-05 07:30:18 -05:00