summaryrefslogtreecommitdiff
path: root/fbin/fbin.py
diff options
context:
space:
mode:
Diffstat (limited to 'fbin/fbin.py')
-rwxr-xr-xfbin/fbin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/fbin/fbin.py b/fbin/fbin.py
index d1dff76..35fd1fc 100755
--- a/fbin/fbin.py
+++ b/fbin/fbin.py
@@ -287,7 +287,7 @@ def files():
context = {
'title': 'Files',
'files': files,
- 'total_size': db.File.pretty_size(sum(f.size for f in files if f.size)),
+ 'total_size': db.File.pretty_size(sum(size for size in (f.get_size() for f in files) if size is not None)),
}
return render_template('files.html', **context)
@@ -339,7 +339,7 @@ def images():
'title': 'Images',
'fullwidth': True,
'files': files,
- 'total_size': db.File.pretty_size(sum(f.size for f in files if f.size)),
+ 'total_size': db.File.pretty_size(sum(size for size in (f.get_size() for f in files) if size is not None)),
}
return render_template('images.html', **context)
@@ -352,7 +352,7 @@ def videos():
'title': 'Videos',
'fullwidth': True,
'files': files,
- 'total_size': db.File.pretty_size(sum(f.size for f in files if f.size)),
+ 'total_size': db.File.pretty_size(sum(size for size in (f.get_size() for f in files) if size is not None)),
}
return render_template('images.html', **context)