From d55df7b1a458cf5195024a32e517477839959ac6 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Sat, 21 Apr 2018 08:25:28 -0400 Subject: [PATCH] Initial commit --- bazarr.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bazarr.py b/bazarr.py index 21c7070e8..a7c8ebbf0 100644 --- a/bazarr.py +++ b/bazarr.py @@ -136,9 +136,11 @@ def image_proxy(url): @route(base_url + 'image_proxy_movies/', method='GET') def image_proxy_movies(url): from get_radarr_settings import get_radarr_settings + url_radarr = get_radarr_settings()[0] url_radarr_short = get_radarr_settings()[1] - - img_pil = Image.open(BytesIO(requests.get(url_radarr_short + '/' + url).content)) + apikey = get_radarr_settings()[2] + url_image = url_radarr_short + '/' + url + '?apikey=' + apikey + img_pil = Image.open(BytesIO(requests.get(url_radarr_short + '/api' + url_image.split(url_radarr)[1]).content)) img_buffer = BytesIO() img_pil.tobytes() img_pil.save(img_buffer, img_pil.format)