Skip to content

Commit

Permalink
Compare timestamps instead of datetimes when exporting (#11790)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed Jun 6, 2024
1 parent 926d394 commit 5b42c91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frigate/record/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ def get_datetime_from_timestamp(self, timestamp: int) -> str:
def save_thumbnail(self, id: str) -> str:
thumb_path = os.path.join(CLIPS_DIR, f"export/{id}.webp")

if datetime.datetime.fromtimestamp(
if (
self.start_time
) < datetime.datetime.now().astimezone(datetime.timezone.utc).replace(
minute=0, second=0, microsecond=0
< datetime.datetime.now(datetime.timezone.utc)
.replace(minute=0, second=0, microsecond=0)
.timestamp()
):
# has preview mp4
try:
Expand Down

0 comments on commit 5b42c91

Please sign in to comment.