mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-06-04 01:16:52 +02:00
parent
7bed854ff7
commit
d64633889b
@ -5,6 +5,7 @@ import logging
|
||||
import os
|
||||
import subprocess as sp
|
||||
import threading
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import cv2
|
||||
@ -101,6 +102,18 @@ class FFMpegConverter(threading.Thread):
|
||||
f"duration {self.frame_times[t_idx + 1] - self.frame_times[t_idx]}"
|
||||
)
|
||||
|
||||
try:
|
||||
p = sp.run(
|
||||
self.ffmpeg_cmd.split(" "),
|
||||
input="\n".join(playlist),
|
||||
encoding="ascii",
|
||||
capture_output=True,
|
||||
)
|
||||
except BlockingIOError:
|
||||
logger.warning(
|
||||
f"Failed to create preview for {self.config.name}, retrying..."
|
||||
)
|
||||
time.sleep(2)
|
||||
p = sp.run(
|
||||
self.ffmpeg_cmd.split(" "),
|
||||
input="\n".join(playlist),
|
||||
|
@ -66,6 +66,7 @@ import {
|
||||
DialogTrigger,
|
||||
} from "../ui/dialog";
|
||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type GeneralSettingsProps = {
|
||||
className?: string;
|
||||
@ -113,13 +114,18 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={className}>
|
||||
<Container>
|
||||
<Trigger>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div
|
||||
className={`flex flex-col items-center justify-center ${isDesktop ? "cursor-pointer rounded-lg bg-secondary text-secondary-foreground hover:bg-muted" : "text-secondary-foreground"}`}
|
||||
className={cn(
|
||||
"flex flex-col items-center justify-center",
|
||||
isDesktop
|
||||
? "cursor-pointer rounded-lg bg-secondary text-secondary-foreground hover:bg-muted"
|
||||
: "text-secondary-foreground",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<LuSettings className="size-5 md:m-[6px]" />
|
||||
</div>
|
||||
@ -321,9 +327,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
||||
<a href="https://docs.frigate.video">
|
||||
<MenuItem
|
||||
className={
|
||||
isDesktop
|
||||
? "cursor-pointer"
|
||||
: "flex items-center p-2 text-sm"
|
||||
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
|
||||
}
|
||||
>
|
||||
<LuLifeBuoy className="mr-2 size-4" />
|
||||
@ -333,9 +337,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
||||
<a href="https://github.com/blakeblackshear/frigate">
|
||||
<MenuItem
|
||||
className={
|
||||
isDesktop
|
||||
? "cursor-pointer"
|
||||
: "flex items-center p-2 text-sm"
|
||||
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
|
||||
}
|
||||
>
|
||||
<LuGithub className="mr-2 size-4" />
|
||||
@ -355,7 +357,6 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
||||
</div>
|
||||
</Content>
|
||||
</Container>
|
||||
</div>
|
||||
{restartDialogOpen && (
|
||||
<AlertDialog
|
||||
open={restartDialogOpen}
|
||||
|
Loading…
Reference in New Issue
Block a user