Accept floats for export when used directly with event start / end time

This commit is contained in:
Nicolas Mowen 2023-07-28 06:35:44 -06:00 committed by GitHub
parent f8c0f74ab8
commit fd8c3a0b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1603,8 +1603,9 @@ def vod_event(id):
)
@bp.route("/export/<camera_name>/start/<start_time>/end/<end_time>", methods=["POST"])
def export_recording(camera_name: str, start_time: int, end_time: int):
@bp.route("/export/<camera_name>/start/<int:start_time>/end/<int:end_time>", methods=["POST"])
@bp.route("/export/<camera_name>/start/<float:start_time>/end/<float:end_time>", methods=["POST"])
def export_recording(camera_name: str, start_time, end_time):
playback_factor = request.get_json(silent=True).get("playback", "realtime")
exporter = RecordingExporter(
current_app.frigate_config,