Add alternate endpoint to cover existing usecase to avoid breaking change

This commit is contained in:
Nick Mowen 2022-12-10 15:50:28 -07:00
parent 57211621a2
commit 6f3ed619c5
2 changed files with 8 additions and 0 deletions

View File

@ -9,8 +9,10 @@ import subprocess as sp
import pytz import pytz
import time import time
import traceback import traceback
from functools import reduce from functools import reduce
from pathlib import Path from pathlib import Path
from tzlocal import get_localzone_name
from urllib.parse import unquote from urllib.parse import unquote
import cv2 import cv2
@ -1022,6 +1024,11 @@ def vod_ts(camera_name, start_ts, end_ts):
) )
@bp.route("/vod/<year_month>/<day>/<hour>/<camera_name>")
def vod_hour_no_timezone(year_month, day, hour, camera_name):
return vod_hour(year_month, day, hour, camera_name, get_localzone_name().replace("/", "_"))
# TODO make this nicer when vod module is removed # TODO make this nicer when vod module is removed
@bp.route("/vod/<year_month>/<day>/<hour>/<camera_name>/<tz_name>") @bp.route("/vod/<year_month>/<day>/<hour>/<camera_name>/<tz_name>")
def vod_hour(year_month, day, hour, camera_name, tz_name): def vod_hour(year_month, day, hour, camera_name, tz_name):

View File

@ -12,6 +12,7 @@ psutil == 5.9.*
pydantic == 1.10.* pydantic == 1.10.*
PyYAML == 6.0 PyYAML == 6.0
pytz == 2022.6 pytz == 2022.6
tzlocal == 4.2
types-PyYAML == 6.0.* types-PyYAML == 6.0.*
requests == 2.28.* requests == 2.28.*
types-requests == 2.28.* types-requests == 2.28.*