From eff2921f9be53da0f7609f47c35e5ce86362ec6c Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 25 Dec 2021 20:27:24 +0100 Subject: [PATCH] Make sure no proxy is used for calls to Kodi's webserver at localhost --- resources/lib/artwork.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lib/artwork.py b/resources/lib/artwork.py index f7a74ab3..a2e169ce 100644 --- a/resources/lib/artwork.py +++ b/resources/lib/artwork.py @@ -99,11 +99,15 @@ def cache_url(url, should_suspend=None): sleeptime = 0 while True: try: + # Make sure that no proxy is used for our calls to Kodi's webserver + # at localhost See + # https://github.com/croneter/PlexKodiConnect/issues/1732 requests.head( url=f'http://{app.CONN.webserver_username}:{app.CONN.webserver_password}@{app.CONN.webserver_host}:{app.CONN.webserver_port}/image/image://{url}', auth=(app.CONN.webserver_username, app.CONN.webserver_password), - timeout=TIMEOUT) + timeout=TIMEOUT, + proxies={'http': None, 'https': None}) except requests.Timeout: # We don't need the result, only trigger Kodi to start the # download. All is well