forked from Github/frigate
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.
This commit is contained in:
@@ -6,6 +6,7 @@ from playhouse.sqlite_ext import *
|
||||
class Event(Model):
|
||||
id = CharField(null=False, primary_key=True, max_length=30)
|
||||
label = CharField(index=True, max_length=20)
|
||||
sub_label = CharField(max_length=20, null=True)
|
||||
camera = CharField(index=True, max_length=20)
|
||||
start_time = DateTimeField()
|
||||
end_time = DateTimeField()
|
||||
|
||||
Reference in New Issue
Block a user