Merge pull request #2409 from koenkooi/mkv-maintenance
timelapse: add m4v and mkv as supported container formats
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -505,7 +505,7 @@ class Server(object):
|
||||
server_routes = self._router.urls + [
|
||||
# various downloads
|
||||
# .mpg and .mp4 timelapses:
|
||||
(r"/downloads/timelapse/([^/]*\.mp[g4])", util.tornado.LargeResponseHandler, joined_dict(dict(path=self._settings.getBaseFolder("timelapse")),
|
||||
(r"/downloads/timelapse/([^/]*\.m(.*))", 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"),
|
||||
|
||||
@@ -128,7 +128,7 @@ def downloadTimelapse(filename):
|
||||
@api.route("/timelapse/<filename>", methods=["DELETE"])
|
||||
@restricted_access
|
||||
def deleteTimelapse(filename):
|
||||
if util.is_allowed_file(filename, ["mpg", "mpeg", "mp4"]):
|
||||
if util.is_allowed_file(filename, ["mpg", "mpeg", "mp4", "m4v", "mkv"]):
|
||||
timelapse_folder = settings().getBaseFolder("timelapse")
|
||||
full_path = os.path.realpath(os.path.join(timelapse_folder, filename))
|
||||
if full_path.startswith(timelapse_folder) and os.path.exists(full_path):
|
||||
|
||||
@@ -86,7 +86,7 @@ def get_finished_timelapses():
|
||||
files = []
|
||||
basedir = settings().getBaseFolder("timelapse")
|
||||
for entry in scandir(basedir):
|
||||
if not fnmatch.fnmatch(entry.name, "*.mp[g4]"):
|
||||
if not fnmatch.fnmatch(entry.name, "*.m*"):
|
||||
continue
|
||||
files.append({
|
||||
"name": entry.name,
|
||||
|
||||
Reference in new issue
Block a user