From 965febc0a84bd598161bf6f7d9f82d00444f6722 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 25 Aug 2022 15:53:24 +0200 Subject: [PATCH] sneed --- files/helpers/wrappers.py | 6 +++--- files/templates/comments.html | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index e1bc29506..673f1d49f 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -62,9 +62,9 @@ def get_logged_in_user(): v.last_active = timestamp g.db.add(v) else: - ua = str(user_agents.parse(g.agent)) - if 'spider' not in ua.lower() and 'bot' not in ua.lower(): - loggedout[session["session_id"]] = (timestamp, ua) + g.parsed_agent = str(user_agents.parse(g.agent)) + if 'spider' not in g.parsed_agent.lower() and 'bot' not in g.parsed_agent.lower(): + loggedout[session["session_id"]] = (timestamp, g.parsed_agent) g.loggedin_counter = len([x for x in loggedin.values() if timestamp-x < LOGGEDIN_ACTIVE_TIME]) cache.set(f'{SITE}_loggedin', loggedin) diff --git a/files/templates/comments.html b/files/templates/comments.html index cf5ee4c3a..dfd74c912 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -945,8 +945,7 @@
{% endif %} -{# if SITE == 'rdrama.net' and not ajax and v and v.theme == 'midnight' #} -{% if False %} +{% if SITE == 'rdrama.net' and not ajax and v and v.theme == 'midnight' and 'Samsung Internet' not in g.parsed_agent %}