diff --git a/octoprint_printhistory/eventHandler.py b/octoprint_printhistory/eventHandler.py
index e9d4b78..95ca623 100644
--- a/octoprint_printhistory/eventHandler.py
+++ b/octoprint_printhistory/eventHandler.py
@@ -52,15 +52,15 @@ def eventHandler(self, event, payload):
filamentVolume = fileData["analysis"]["filament"]["tool0"]["volume"]
filamentLength = fileData["analysis"]["filament"]["tool0"]['length']
- currentFile["filamentVolume"] = filamentVolume
- currentFile["filamentLength"] = filamentLength
+ currentFile["filamentVolume"] = filamentVolume if filamentVolume is not None else 0
+ currentFile["filamentLength"] = filamentLength if filamentLength is not None else 0
if "tool1" in fileData["analysis"]["filament"]:
filamentVolume = fileData["analysis"]["filament"]["tool1"]["volume"]
filamentLength = fileData["analysis"]["filament"]["tool1"]['length']
- currentFile["filamentVolume2"] = filamentVolume
- currentFile["filamentLength2"] = filamentLength
+ currentFile["filamentVolume2"] = filamentVolume if filamentVolume is not None else 0
+ currentFile["filamentLength2"] = filamentLength if filamentLength is not None else 0
estimatedPrintTime = fileData["analysis"]["estimatedPrintTime"] if "estimatedPrintTime" in fileData["analysis"] else 0
diff --git a/octoprint_printhistory/static/css/printhistory.css b/octoprint_printhistory/static/css/printhistory.css
index 20d8789..7d42fc1 100644
--- a/octoprint_printhistory/static/css/printhistory.css
+++ b/octoprint_printhistory/static/css/printhistory.css
@@ -25,3 +25,15 @@
font-size: 85%;
color: #999;
}
+
+#tab_plugin_printhistory .summary {
+ margin-bottom: 5px;
+}
+
+#tab_plugin_printhistory .summary th {
+ font-weight: bold;
+ border-top: 1px solid #ddd;
+ background-color: #f9f9f9;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
diff --git a/octoprint_printhistory/templates/printhistory_tab.jinja2 b/octoprint_printhistory/templates/printhistory_tab.jinja2
index c7731bd..c08bfcf 100644
--- a/octoprint_printhistory/templates/printhistory_tab.jinja2
+++ b/octoprint_printhistory/templates/printhistory_tab.jinja2
@@ -69,7 +69,7 @@ Refresh
+
Total: |
@@ -79,7 +79,7 @@ Refresh
+