diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index e1bc295065..673f1d49fd 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 cf5ee4c3a1..dfd74c9125 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 %}