allow download/management of mp4 timelapse too

(cherry picked from commit a00faf2)
This commit is contained in:
Andrew Malota 2016-03-07 14:44:11 +01:00 committed by Gina Häußge
parent 4a933228c7
commit 398eaf58a9
2 changed files with 2 additions and 2 deletions

View file

@ -370,7 +370,7 @@ class Server():
server_routes = self._router.urls + [
# various downloads
(r"/downloads/timelapse/([^/]*\.mpg)", util.tornado.LargeResponseHandler, joined_dict(dict(path=s.getBaseFolder("timelapse")), download_handler_kwargs, no_hidden_files_validator)),
(r"/downloads/timelapse/([^/]*\.mp[g4])", util.tornado.LargeResponseHandler, joined_dict(dict(path=s.getBaseFolder("timelapse")), download_handler_kwargs, no_hidden_files_validator)),
(r"/downloads/files/local/(.*)", util.tornado.LargeResponseHandler, joined_dict(dict(path=s.getBaseFolder("uploads")), download_handler_kwargs, no_hidden_files_validator, additional_mime_types)),
(r"/downloads/logs/([^/]*)", util.tornado.LargeResponseHandler, joined_dict(dict(path=s.getBaseFolder("logs")), download_handler_kwargs, admin_validator)),
# camera snapshot

View file

@ -62,7 +62,7 @@ def get_finished_timelapses():
files = []
basedir = settings().getBaseFolder("timelapse")
for osFile in os.listdir(basedir):
if not fnmatch.fnmatch(osFile, "*.mpg"):
if not fnmatch.fnmatch(osFile, "*.mp[g4]"):
continue
statResult = os.stat(os.path.join(basedir, osFile))
files.append({