Auto download optional files command line argument
This commit is contained in:
parent
ac230219ee
commit
4cd393e4d8
2 changed files with 3 additions and 0 deletions
|
@ -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')
|
||||
|
|
|
@ -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"]:
|
||||
|
|
Loading…
Reference in a new issue