From 22e10d99e00e437310887f78b5cd2f933b21db30 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 19 Apr 2018 20:09:18 -0400 Subject: [PATCH] Adding "/api" to URI of image proxy --- bazarr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazarr.py b/bazarr.py index 71672a234..660eb398c 100644 --- a/bazarr.py +++ b/bazarr.py @@ -120,10 +120,11 @@ def download_log(): @route(base_url + 'image_proxy/', method='GET') def image_proxy(url): from get_sonarr_settings import get_sonarr_settings + url_sonarr = get_sonarr_settings()[0] url_sonarr_short = get_sonarr_settings()[1] apikey = get_sonarr_settings()[2] - - img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/' + url + '?apikey=' + apikey).content)) + url_image = url_sonarr_short + '/' + url + '?apikey=' + apikey + img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/api' + url_image.split(url_sonarr)[1]).content)) img_buffer = BytesIO() img_pil.tobytes() img_pil.save(img_buffer, img_pil.format)