version 0.1.6, dont check own sites integrity, serving newly added sites, only serve .html files with wrapper, pass query string to innerframe, support for background-color in content.json, websocket api sitepublish and filewrite commands, pass hashchange to innerframe, wrapperPrompt notification support,

This commit is contained in:
HelloZeroNet 2015-01-24 19:14:29 +01:00
parent a977feec33
commit 024655cf15
11 changed files with 172 additions and 16 deletions

View file

@ -150,7 +150,7 @@ class Site:
if changed_files:
for changed_file in changed_files:
self.bad_files[changed_file] = True
self.checkFiles(quick_check=True) # Quick check files based on file size
if not self.settings["own"]: self.checkFiles(quick_check=True) # Quick check files based on file size
if self.bad_files:
self.download()
return changed_files
@ -457,7 +457,6 @@ class Site:
self.log.info("Signing modified content.json...")
sign_content = json.dumps(content, sort_keys=True)
self.log.debug("Content: %s" % sign_content)
sign = CryptBitcoin.sign(sign_content, privatekey)
content["sign"] = sign
@ -466,3 +465,4 @@ class Site:
open("%s/content.json" % self.directory, "w").write(json.dumps(content, indent=4, sort_keys=True))
self.log.info("Site signed!")
return True

View file

@ -47,7 +47,10 @@ def need(address, all_file=True):
if not isAddress(address): raise Exception("Not address: %s" % address)
logging.debug("Added new site: %s" % address)
sites[address] = Site(address)
sites[address].settings["serving"] = True # Maybe it was deleted before
if not sites[address].settings["serving"]: # Maybe it was deleted before
sites[address].settings["serving"] = True
sites[address].saveSettings()
site = sites[address]
if all_file: site.download()
return site