Add verbose mode to Media Sync (#22592)

* add verbose mode to media sync

writes a report to /config/media_sync showing all of the orphaned paths by media type

* frontend

* docs
This commit is contained in:
Josh Hawkins
2026-03-23 11:05:38 -05:00
committed by GitHub
parent 5d67ba76fd
commit a89c7d8819
8 changed files with 117 additions and 5 deletions

View File

@@ -162,6 +162,8 @@ Normal operation may leave small numbers of orphaned files until Frigate's sched
The Maintenance pane in the Frigate UI or an API endpoint `POST /api/media/sync` can be used to trigger a media sync. When using the API, a job ID is returned and the operation continues on the server. Status can be checked with the `/api/media/sync/status/{job_id}` endpoint.
Setting `verbose: true` writes a detailed report of every orphaned file and database entry to `/config/media_sync/<job_id>.txt`. For recordings, the report separates orphaned database entries (DB records whose files are missing from disk) from orphaned files (files on disk with no corresponding database record).
:::warning
This operation uses considerable CPU resources and includes a safety threshold that aborts if more than 50% of files would be deleted. Only run when necessary. If you set `force: true` the safety threshold will be bypassed; do not use `force` unless you are certain the deletions are intended.

View File

@@ -6891,6 +6891,11 @@ components:
title: Force
description: "If True, bypass safety threshold checks"
default: false
verbose:
type: boolean
title: Verbose
description: "If True, write full orphan file list to /config/media_sync/<job_id>.txt"
default: false
type: object
title: MediaSyncBody
MotionSearchMetricsResponse: