mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Use start time instead of event over to determine gif
This commit is contained in:
parent
8e9e03a936
commit
69ed2175cf
@ -15,7 +15,7 @@ export function AnimatedEventThumbnail({ event }: AnimatedEventThumbnailProps) {
|
|||||||
const { data: config } = useSWR<FrigateConfig>("config");
|
const { data: config } = useSWR<FrigateConfig>("config");
|
||||||
|
|
||||||
const imageUrl = useMemo(() => {
|
const imageUrl = useMemo(() => {
|
||||||
if (!event.end_time) {
|
if (Date.now() / 1000 < event.start_time + 20) {
|
||||||
return `${apiHost}api/preview/${event.camera}/${event.start_time}/thumbnail.jpg`;
|
return `${apiHost}api/preview/${event.camera}/${event.start_time}/thumbnail.jpg`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user