mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	* Keep track of objects max review severity * Refactor cleanup to split snapshots and clips * Cleanup events based on review severity * Cleanup review imports * Don't catch detections
		
			
				
	
	
		
			44 lines
		
	
	
		
			840 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			840 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from datetime import datetime
 | |
| from typing import Dict
 | |
| 
 | |
| from pydantic import BaseModel, Json
 | |
| 
 | |
| from frigate.review.types import SeverityEnum
 | |
| 
 | |
| 
 | |
| class ReviewSegmentResponse(BaseModel):
 | |
|     id: str
 | |
|     camera: str
 | |
|     start_time: datetime
 | |
|     end_time: datetime
 | |
|     has_been_reviewed: bool
 | |
|     severity: SeverityEnum
 | |
|     thumb_path: str
 | |
|     data: Json
 | |
| 
 | |
| 
 | |
| class Last24HoursReview(BaseModel):
 | |
|     reviewed_alert: int
 | |
|     reviewed_detection: int
 | |
|     total_alert: int
 | |
|     total_detection: int
 | |
| 
 | |
| 
 | |
| class DayReview(BaseModel):
 | |
|     day: datetime
 | |
|     reviewed_alert: int
 | |
|     reviewed_detection: int
 | |
|     total_alert: int
 | |
|     total_detection: int
 | |
| 
 | |
| 
 | |
| class ReviewSummaryResponse(BaseModel):
 | |
|     last24Hours: Last24HoursReview
 | |
|     root: Dict[str, DayReview]
 | |
| 
 | |
| 
 | |
| class ReviewActivityMotionResponse(BaseModel):
 | |
|     start_time: int
 | |
|     motion: float
 | |
|     camera: str
 |