diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index cb68e5c8..a57e0406 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -126,14 +126,18 @@ class UiWebsocketPlugin(object): # Collect stats size_filetypes = {} size_total = 0 - for content in site.content_manager.contents.values(): + for key, content in site.content_manager.contents.iteritems(): if "files" not in content: continue for file_name, file_details in content["files"].items(): size_total += file_details["size"] ext = file_name.split(".")[-1] size_filetypes[ext] = size_filetypes.get(ext, 0) + file_details["size"] - size_other = size_total + + # The missing difference is content.json sizes + if "json" in size_filetypes: + size_filetypes["json"] += site.settings["size"] - size_total + size_total = size_other = site.settings["size"] # Bar for extension, color in extensions: diff --git a/src/Config.py b/src/Config.py index ae6b146b..565e4b83 100644 --- a/src/Config.py +++ b/src/Config.py @@ -8,7 +8,7 @@ class Config(object): def __init__(self, argv): self.version = "0.3.7" - self.rev = 1276 + self.rev = 1277 self.argv = argv self.action = None self.config_file = "zeronet.conf"