Ability to skip check files on update

This commit is contained in:
HelloZeroNet 2016-03-18 19:19:16 +01:00
parent 2c4f582437
commit a692640e46

View file

@ -264,7 +264,7 @@ class Site(object):
# Update content.json from peers and download changed files # Update content.json from peers and download changed files
# Return: None # Return: None
@util.Noparallel() @util.Noparallel()
def update(self, announce=False): def update(self, announce=False, check_files=True):
self.content_manager.loadContent("content.json") # Reload content.json self.content_manager.loadContent("content.json") # Reload content.json
self.content_updated = None # Reset content updated time self.content_updated = None # Reset content updated time
self.updateWebsocket(updating=True) self.updateWebsocket(updating=True)
@ -273,6 +273,7 @@ class Site(object):
queried = self.checkModifications() queried = self.checkModifications()
if check_files:
self.storage.checkFiles(quick_check=True) # Quick check and mark bad files based on file size self.storage.checkFiles(quick_check=True) # Quick check and mark bad files based on file size
changed, deleted = self.content_manager.loadContent("content.json") changed, deleted = self.content_manager.loadContent("content.json")