mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	only save the event to the database if a snapshot or clip exists
This commit is contained in:
		
							parent
							
								
									a803ab8577
								
							
						
					
					
						commit
						1b85e561b9
					
				@ -205,11 +205,12 @@ class EventProcessor(threading.Thread):
 | 
			
		||||
            if event_type == 'end':
 | 
			
		||||
                clips_config = self.config.cameras[camera].clips
 | 
			
		||||
 | 
			
		||||
                clip_created = False
 | 
			
		||||
                if self.should_create_clip(camera, event_data):
 | 
			
		||||
                    clip_created = False
 | 
			
		||||
                    if clips_config.enabled and (clips_config.objects is None or event_data['label'] in clips_config.objects):
 | 
			
		||||
                        clip_created = self.create_clip(camera, event_data, clips_config.pre_capture, clips_config.post_capture)
 | 
			
		||||
                
 | 
			
		||||
                if clip_created or event_data['has_snapshot']:
 | 
			
		||||
                    Event.create(
 | 
			
		||||
                        id=event_data['id'],
 | 
			
		||||
                        label=event_data['label'],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user