Skip to content

Commit

Permalink
fix timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm authored and blakeblackshear committed Jun 25, 2021
1 parent ab93cae commit 3fb24b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frigate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ class CameraConfig(BaseModel):
)
motion: Optional[MotionConfig] = Field(title="Motion detection configuration.")
detect: Optional[DetectConfig] = Field(title="Object detection configuration.")
timestamp_style: Optional[TimestampStyleConfig] = Field(
title="Timestamp style configuration."
timestamp_style: TimestampStyleConfig = Field(
default_factory=TimestampStyleConfig, title="Timestamp style configuration."
)

def __init__(self, **config):
Expand Down
3 changes: 2 additions & 1 deletion frigate/object_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,15 @@ def get_current_frame(self, draw_options={}):
)

if draw_options.get("timestamp"):
color = self.camera_config.timestamp_style.color
draw_timestamp(
frame_copy,
frame_time,
self.camera_config.timestamp_style.format,
font_effect=self.camera_config.timestamp_style.effect,
font_scale=self.camera_config.timestamp_style.scale,
font_thickness=self.camera_config.timestamp_style.thickness,
font_color=self.camera_config.timestamp_style.color,
font_color=(color.red, color.green, color.blue),
position=self.camera_config.timestamp_style.position,
)

Expand Down

0 comments on commit 3fb24b4

Please sign in to comment.