mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-01 16:42:18 +03:00
Fixes (#18795)
* Catch error when regex is invalid * Fix i18n label * Mobile camera drawer i18n fixes * additional frame cache debug logs * Add Romanian * Fix exports thumbnail path * Improve clip buffer and remove outdated comments --------- Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
co-authored by
Josh Hawkins
parent
4ff81d5877
commit
8a9ebe9292
@@ -48,7 +48,7 @@ import {
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { ReviewSegment } from "@/types/review";
|
||||
import { REVIEW_PADDING, ReviewSegment } from "@/types/review";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import Chip from "@/components/indicators/Chip";
|
||||
import { capitalizeAll } from "@/utils/stringUtil";
|
||||
@@ -1229,11 +1229,14 @@ export function VideoTab({ search }: VideoTabProps) {
|
||||
const { data: reviewItem } = useSWR<ReviewSegment>([
|
||||
`review/event/${search.id}`,
|
||||
]);
|
||||
const endTime = useMemo(() => search.end_time ?? Date.now() / 1000, [search]);
|
||||
|
||||
// subtract 2 seconds from start_time to account for keyframes and any differences in the record/detect streams
|
||||
// to help the start of the event from not being completely cut off
|
||||
const source = `${baseUrl}vod/${search.camera}/start/${search.start_time - 2}/end/${endTime}/index.m3u8`;
|
||||
const clipTimeRange = useMemo(() => {
|
||||
const startTime = search.start_time - REVIEW_PADDING;
|
||||
const endTime = (search.end_time ?? Date.now() / 1000) + REVIEW_PADDING;
|
||||
return `start/${startTime}/end/${endTime}`;
|
||||
}, [search]);
|
||||
|
||||
const source = `${baseUrl}vod/${search.camera}/${clipTimeRange}/index.m3u8`;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -1272,7 +1275,7 @@ export function VideoTab({ search }: VideoTabProps) {
|
||||
<TooltipTrigger asChild>
|
||||
<a
|
||||
download
|
||||
href={`${baseUrl}api/${search.camera}/start/${search.start_time}/end/${endTime}/clip.mp4?trim=end`}
|
||||
href={`${baseUrl}api/${search.camera}/${clipTimeRange}/clip.mp4`}
|
||||
>
|
||||
<Chip className="cursor-pointer rounded-md bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500">
|
||||
<FaDownload className="size-4 text-white" />
|
||||
|
||||
@@ -6,6 +6,7 @@ export const supportedLanguageKeys = [
|
||||
"de",
|
||||
"it",
|
||||
"ca",
|
||||
"ro",
|
||||
"nl",
|
||||
"nb-NO",
|
||||
"zh-CN",
|
||||
|
||||
@@ -1578,7 +1578,7 @@ function FrigateCameraFeatures({
|
||||
<div className="mt-3 flex flex-col gap-5">
|
||||
{!isRestreamed && (
|
||||
<div className="flex flex-col gap-2 p-2">
|
||||
<Label>{t("streaming.title", { ns: "components/dialog" })}</Label>
|
||||
<Label>{t("stream.title")}</Label>
|
||||
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
||||
<LuX className="size-4 text-danger" />
|
||||
<div>
|
||||
@@ -1596,7 +1596,7 @@ function FrigateCameraFeatures({
|
||||
</div>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-80 text-xs">
|
||||
{t("streaming.restreaming.desc", {
|
||||
{t("streaming.restreaming.desc.title", {
|
||||
ns: "components/dialog",
|
||||
})}
|
||||
<div className="mt-2 flex items-center text-primary">
|
||||
@@ -1606,7 +1606,7 @@ function FrigateCameraFeatures({
|
||||
rel="noopener noreferrer"
|
||||
className="inline"
|
||||
>
|
||||
{t("streaming.restreaming.readTheDocumentation", {
|
||||
{t("streaming.restreaming.desc.readTheDocumentation", {
|
||||
ns: "components/dialog",
|
||||
})}
|
||||
<LuExternalLink className="ml-2 inline-flex size-3" />
|
||||
|
||||
Reference in New Issue
Block a user