summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xFiler.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Filer.py b/Filer.py
index b7defd8..ddafd08 100755
--- a/Filer.py
+++ b/Filer.py
@@ -29,7 +29,8 @@ app.config['DROPZONE_DEFAULT_MESSAGE'] = 'Ziehe die Dateien hier hin, um sie hoc
29 29
30dropzone = Dropzone(app) 30dropzone = Dropzone(app)
31 31
32basedir = 'Daten' 32basedir = os.getenv('FILER_BASEDIR', './Daten')
33filettl = int(os.getenv('FILER_FILETTL', 10))
33 34
34#### ADMIN FACING DIRECTORY LISTS #### 35#### ADMIN FACING DIRECTORY LISTS ####
35#### 36####
@@ -151,7 +152,7 @@ def make_tree(rel, path):
151 if os.path.isdir(os.path.join(rel,fn)): 152 if os.path.isdir(os.path.join(rel,fn)):
152 tree['children'].append(make_tree(rel, fn)) 153 tree['children'].append(make_tree(rel, fn))
153 else: 154 else:
154 ttl = 10 - int((time.time() - os.path.getmtime(os.path.join(rel,fn))) / (24*3600)) 155 ttl = filettl - int((time.time() - os.path.getmtime(os.path.join(rel,fn))) / (24*3600))
155 tree['children'].append(dict(name=fn, download=name, ttl = ttl)) 156 tree['children'].append(dict(name=fn, download=name, ttl = ttl))
156 return tree 157 return tree
157 158