From 0bbeede9751b74f593390ca0379d8133a0c2119f Mon Sep 17 00:00:00 2001 From: shortcutme Date: Fri, 9 Aug 2019 13:17:48 +0200 Subject: [PATCH] Don't try to display bigfile limit settings if no bigfile plugin enabled --- plugins/Sidebar/SidebarPlugin.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/Sidebar/SidebarPlugin.py b/plugins/Sidebar/SidebarPlugin.py index 46219d8a..f1a5e8e8 100644 --- a/plugins/Sidebar/SidebarPlugin.py +++ b/plugins/Sidebar/SidebarPlugin.py @@ -321,14 +321,15 @@ class UiWebsocketPlugin(object):
""")) - autodownload_bigfile_size_limit = int(site.settings.get("autodownload_bigfile_size_limit", config.autodownload_bigfile_size_limit)) - body.append(_(""" -
- - MB - {_[Set]} -
- """)) + if hasattr(config, "autodownload_bigfile_size_limit"): + autodownload_bigfile_size_limit = int(site.settings.get("autodownload_bigfile_size_limit", config.autodownload_bigfile_size_limit)) + body.append(_(""" +
+ + MB + {_[Set]} +
+ """)) body.append("") def sidebarRenderBadFiles(self, body, site):