Auto download optional files command line argument

This commit is contained in:
shortcutme 2017-07-31 14:39:21 +02:00
parent ac230219ee
commit 4cd393e4d8
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
2 changed files with 3 additions and 0 deletions

View File

@ -224,6 +224,7 @@ class Config(object):
self.parser.add_argument("--fix_float_decimals", help='Fix content.json modification date float precision on verification',
type='bool', choices=[True, False], default=fix_float_decimals)
self.parser.add_argument("--db_mode", choices=["speed", "security"], default="speed")
self.parser.add_argument("--download_optional", choices=["manual", "auto"], default="manual")
self.parser.add_argument('--coffeescript_compiler', help='Coffeescript compiler for developing', default=coffeescript,
metavar='executable_path')

View File

@ -96,6 +96,8 @@ class Site(object):
"own": False, "serving": True, "permissions": [],
"added": int(time.time()), "optional_downloaded": 0, "size_optional": 0
} # Default
if config.download_optional == "auto":
self.settings["autodownloadoptional"] = True
# Add admin permissions to homepage
if self.address == config.homepage and "ADMIN" not in self.settings["permissions"]: