aboutsummaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorJames Taylor <28744867+user234683@users.noreply.github.com>2020-10-21 18:53:12 -0700
committerGitHub <noreply@github.com>2020-10-21 18:53:12 -0700
commitaa52c7a42e9573105dfadb07981c7f5f1447ca9d (patch)
tree6bff6ae507db03e435bb04e3969ef08093f3f8d8 /settings.py
parent3b5df36b0310b751fc25f8c0b7167c659c8259de (diff)
parentf01ef36a37c9112eca3f85d49622c41d68000a69 (diff)
downloadyt-local-aa52c7a42e9573105dfadb07981c7f5f1447ca9d.tar.lz
yt-local-aa52c7a42e9573105dfadb07981c7f5f1447ca9d.tar.xz
yt-local-aa52c7a42e9573105dfadb07981c7f5f1447ca9d.zip
Merge branch 'master' into add_sponsorblock
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py32
1 files changed, 26 insertions, 6 deletions
diff --git a/settings.py b/settings.py
index 7417cc6..e1cec13 100644
--- a/settings.py
+++ b/settings.py
@@ -160,6 +160,19 @@ For security reasons, enabling this is not recommended.''',
],
}),
+ ('font', {
+ 'type': int,
+ 'default': 1,
+ 'comment': '',
+ 'options': [
+ (0, 'Browser default'),
+ (1, 'Arial'),
+ (2, 'Liberation Serif'),
+ (3, 'Verdana'),
+ (4, 'Tahoma'),
+ ],
+ }),
+
('autocheck_subscriptions', {
'type': bool,
'default': 0,
@@ -319,12 +332,6 @@ else:
globals().update(current_settings_dict)
-if proxy_images:
- img_prefix = "/"
-else:
- img_prefix = ""
-
-
if route_tor:
print("Tor routing is ON")
@@ -343,6 +350,19 @@ def add_setting_changed_hook(setting, func):
hooks[setting] = [func]
+def set_img_prefix(old_value=None, value=None):
+ global img_prefix
+ if value is None:
+ value = proxy_images
+ if value:
+ img_prefix = '/'
+ else:
+ img_prefix = ''
+set_img_prefix()
+add_setting_changed_hook('proxy_images', set_img_prefix)
+
+
+
def settings_page():
if request.method == 'GET':
return flask.render_template('settings.html',