From ffd637cc0c6b42231245a8cbc9adf2730b81db8d Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Fri, 30 Dec 2022 06:34:01 -0800 Subject: [PATCH] fix: handle multi-word timezones (#4816) --- frigate/http.py | 4 ++-- web/src/routes/Recording.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index 901097679..a469709b8 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -1088,14 +1088,14 @@ def vod_ts(camera_name, start_ts, end_ts): @bp.route("/vod////") def vod_hour_no_timezone(year_month, day, hour, camera_name): return vod_hour( - year_month, day, hour, camera_name, get_localzone_name().replace("/", "_") + year_month, day, hour, camera_name, get_localzone_name().replace("/", ",") ) # TODO make this nicer when vod module is removed @bp.route("/vod/////") def vod_hour(year_month, day, hour, camera_name, tz_name): - tz_name = tz_name.replace("_", "/") + tz_name = tz_name.replace(",", "/") parts = year_month.split("-") start_date = datetime( int(parts[0]), int(parts[1]), int(day), int(hour), tzinfo=pytz.timezone(tz_name) diff --git a/web/src/routes/Recording.jsx b/web/src/routes/Recording.jsx index 418b0d7ed..7b904c707 100644 --- a/web/src/routes/Recording.jsx +++ b/web/src/routes/Recording.jsx @@ -71,7 +71,7 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se { src: `${apiHost}vod/${year}-${month}/${day}/${h.hour}/${camera}/${timezone.replaceAll( '/', - '_' + ',' )}/master.m3u8`, type: 'application/vnd.apple.mpegurl', },