aboutsummaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-07 19:28:52 +0200
committerzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-07 19:28:52 +0200
commitf8d9be2d5a947a2adde12d187a52b18b7218c541 (patch)
treee0c2943b1de9f400acdbd25db2492c3673d88733 /settings.py
parent9123d9a6cfa2af511b17591541ab2e67aa83475f (diff)
downloadyt-local-f8d9be2d5a947a2adde12d187a52b18b7218c541.tar.lz
yt-local-f8d9be2d5a947a2adde12d187a52b18b7218c541.tar.xz
yt-local-f8d9be2d5a947a2adde12d187a52b18b7218c541.zip
settings.py: add 'proxy_images'
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/settings.py b/settings.py
index 942f79c..56a6a01 100644
--- a/settings.py
+++ b/settings.py
@@ -128,6 +128,13 @@ For security reasons, enabling this is not recommended.''',
'comment': '',
}),
+ ('proxy_images', {
+ 'label': 'proxy images',
+ 'type': bool,
+ 'default': True,
+ 'comment': '',
+ }),
+
('theme', {
'type': int,
'default': 0,
@@ -257,7 +264,7 @@ else:
if type(node) != ast.Assign:
log_ignored_line(node.lineno, "only assignments are allowed")
continue
-
+
if len(node.targets) > 1:
log_ignored_line(node.lineno, "only simple single-variable assignments allowed")
continue
@@ -266,11 +273,11 @@ else:
if type(target) != ast.Name:
log_ignored_line(node.lineno, "only simple single-variable assignments allowed")
continue
-
+
if target.id not in acceptable_targets:
log_ignored_line(node.lineno, target.id + " is not a valid setting")
continue
-
+
if type(node.value) not in attributes:
log_ignored_line(node.lineno, "only literals allowed for values")
continue
@@ -298,6 +305,11 @@ else:
globals().update(current_settings_dict)
+if proxy_images:
+ img_prefix = "/"
+else:
+ img_prefix = ""
+
if route_tor: