Skip to content
Permalink
Browse files

allow download/management of mp4 timelapse too

  • Loading branch information...
2bitoperations committed Mar 7, 2016
1 parent cb687f0 commit a00faf2a335fd1a6d14156fa07235b920517299b
Showing with 3 additions and 2 deletions.
  1. +2 −1 src/octoprint/server/__init__.py
  2. +1 −1 src/octoprint/timelapse.py
@@ -366,7 +366,8 @@ def joined_dict(*dicts):

server_routes = self._router.urls + [
# various downloads
(r"/downloads/timelapse/([^/]*\.mpg)", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("timelapse")),
# .mpg and .mp4 timelapses:
(r"/downloads/timelapse/([^/]*\.mp[g4])", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("timelapse")),
download_handler_kwargs,
no_hidden_files_validator)),
(r"/downloads/files/local/(.*)", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("uploads")),
@@ -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({

0 comments on commit a00faf2

Please sign in to comment.
You can’t perform that action at this time.