Skip to content

Commit

Permalink
switch to new snapshot endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Jan 23, 2021
1 parent 1685d90 commit d174ecd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/frigate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ def _create_url(self, event_id: str, path: str) -> str:
"""Create URL to service."""
if path == "thumbnail.jpg":
return urllib.parse.urljoin(self._host, f"/api/events/{event_id}/thumbnail.jpg")
if path == "snapshot.jpg":
return urllib.parse.urljoin(self._host, f"/api/events/{event_id}/snapshot.jpg")

camera = path.split("/")[0]
if path.endswith("snapshot.jpg"):
return urllib.parse.urljoin(self._host, f"/clips/{camera}-{event_id}.jpg")
if path.endswith("clip.mp4"):
return urllib.parse.urljoin(self._host, f"/clips/{camera}-{event_id}.mp4")

Expand Down

0 comments on commit d174ecd

Please sign in to comment.