mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Change in_progress to default to no filtering, 0 means no in progress, 1 means only in progress.
This commit is contained in:
parent
6a1ea5e342
commit
6ec358c128
@ -564,8 +564,8 @@ def events():
|
|||||||
before = request.args.get("before", type=float)
|
before = request.args.get("before", type=float)
|
||||||
has_clip = request.args.get("has_clip", type=int)
|
has_clip = request.args.get("has_clip", type=int)
|
||||||
has_snapshot = request.args.get("has_snapshot", type=int)
|
has_snapshot = request.args.get("has_snapshot", type=int)
|
||||||
|
in_progress = request.args.get("in_progress", type=int)
|
||||||
include_thumbnails = request.args.get("include_thumbnails", default=1, type=int)
|
include_thumbnails = request.args.get("include_thumbnails", default=1, type=int)
|
||||||
in_progress = request.args.get("in_progress", default=0, type=int)
|
|
||||||
|
|
||||||
favorites = request.args.get("favorites", type=int)
|
favorites = request.args.get("favorites", type=int)
|
||||||
|
|
||||||
@ -633,14 +633,14 @@ def events():
|
|||||||
if not has_snapshot is None:
|
if not has_snapshot is None:
|
||||||
clauses.append((Event.has_snapshot == has_snapshot))
|
clauses.append((Event.has_snapshot == has_snapshot))
|
||||||
|
|
||||||
|
if not in_progress is None:
|
||||||
|
clauses.append((Event.end_time.is_null(in_progress)))
|
||||||
|
|
||||||
if not include_thumbnails:
|
if not include_thumbnails:
|
||||||
excluded_fields.append(Event.thumbnail)
|
excluded_fields.append(Event.thumbnail)
|
||||||
else:
|
else:
|
||||||
selected_columns.append(Event.thumbnail)
|
selected_columns.append(Event.thumbnail)
|
||||||
|
|
||||||
if in_progress:
|
|
||||||
clauses.append((Event.end_time.is_null()))
|
|
||||||
|
|
||||||
if favorites:
|
if favorites:
|
||||||
clauses.append((Event.retain_indefinitely == favorites))
|
clauses.append((Event.retain_indefinitely == favorites))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user