feat: Add support for Frigate reviews / detections [initial PR] (#2315)
- Add support for Frigate reviews / detections. - Add support for GenAI metadata. - Significant internal refactor to more flexible "UnifiedQuery" to allow mixing cameras with simple metadata and review metadata (e.g. a timeline view of a Frigate camera with reviews, and a Reolink camera with simple metadata). - Add support for folder media as camera media. There are a few more PRs to commit prior to this going live, but commiting this for now due to the scale of the change. BREAKING CHANGE: `media_type` and `events_type` are retired under `live`, `viewer` and `timeline` configuration sections, instead media type is associated (once) with the camera under `media`.
This commit is contained in:
@@ -22,6 +22,8 @@ export const VIEWS_USER_SPECIFIED = [
|
||||
'snapshots',
|
||||
'recording',
|
||||
'recordings',
|
||||
'review',
|
||||
'reviews',
|
||||
'image',
|
||||
'timeline',
|
||||
] as const;
|
||||
|
||||
@@ -9,8 +9,10 @@ const thumbnailControlsBaseDefaults = {
|
||||
size: THUMBNAIL_WIDTH_DEFAULT,
|
||||
show_details: true,
|
||||
show_favorite_control: true,
|
||||
show_timeline_control: true,
|
||||
show_download_control: true,
|
||||
show_timeline_control: false,
|
||||
show_download_control: false,
|
||||
show_review_control: true,
|
||||
show_info_control: true,
|
||||
};
|
||||
|
||||
// Configuration for the actual rendered thumbnail.
|
||||
@@ -30,6 +32,12 @@ export const thumbnailsControlBaseSchema = z.object({
|
||||
show_download_control: z
|
||||
.boolean()
|
||||
.default(thumbnailControlsBaseDefaults.show_download_control),
|
||||
show_review_control: z
|
||||
.boolean()
|
||||
.default(thumbnailControlsBaseDefaults.show_review_control),
|
||||
show_info_control: z
|
||||
.boolean()
|
||||
.default(thumbnailControlsBaseDefaults.show_info_control),
|
||||
});
|
||||
export type ThumbnailsControlBaseConfig = z.infer<typeof thumbnailsControlBaseSchema>;
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
import { eventsMediaTypeSchema } from '../events-media';
|
||||
import { thumbnailControlsDefaults } from './thumbnails';
|
||||
|
||||
const timelineCoreConfigDefault = {
|
||||
export const timelineCoreConfigDefault = {
|
||||
clustering_threshold: 3,
|
||||
events_media_type: 'all' as const,
|
||||
window_seconds: 60 * 60,
|
||||
show_recordings: true,
|
||||
style: 'stack' as const,
|
||||
@@ -26,9 +23,6 @@ export const timelineCoreConfigSchema = z.object({
|
||||
.number()
|
||||
.optional()
|
||||
.default(timelineCoreConfigDefault.clustering_threshold),
|
||||
events_media_type: eventsMediaTypeSchema
|
||||
.optional()
|
||||
.default(timelineCoreConfigDefault.events_media_type),
|
||||
window_seconds: z
|
||||
.number()
|
||||
.min(1 * 60)
|
||||
@@ -58,10 +52,3 @@ export const miniTimelineConfigSchema = timelineCoreConfigSchema.extend({
|
||||
style: timelineCoreConfigSchema.shape.style.default(miniTimelineConfigDefault.style),
|
||||
});
|
||||
export type MiniTimelineControlConfig = z.infer<typeof miniTimelineConfigSchema>;
|
||||
|
||||
export const timelineConfigDefault = {
|
||||
...timelineCoreConfigDefault,
|
||||
controls: {
|
||||
thumbnails: thumbnailControlsDefaults,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import { z } from 'zod';
|
||||
import { SEVERITIES } from '../../../types';
|
||||
|
||||
export const severitySchema = z.enum(SEVERITIES);
|
||||
Reference in New Issue
Block a user