From 7ad78b453636897e385c6c21c2ad22af4541eae4 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Thu, 17 May 2018 08:40:58 -0700 Subject: [PATCH] Allow images through newsletter password auth --- plexpy/webserve.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 418dfc41..0599d0b2 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -5749,7 +5749,9 @@ class WebInterface(object): raise cherrypy.HTTPRedirect(redirect_uri) elif plexpy.CONFIG.NEWSLETTER_AUTH == 1 and plexpy.CONFIG.NEWSLETTER_PASSWORD: - if kwargs.pop('key', None) == plexpy.CONFIG.NEWSLETTER_PASSWORD: + if len(args) >= 2 and args[0] == 'image': + return self.newsletter_auth(*args, **kwargs) + elif kwargs.pop('key', None) == plexpy.CONFIG.NEWSLETTER_PASSWORD: return self.newsletter_auth(*args, **kwargs) else: return serve_template(templatename="newsletter_auth.html",