mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-27 01:57:33 +00:00
Merge branch 'development' into radarr
This commit is contained in:
commit
0537e73ad3
1 changed files with 4 additions and 2 deletions
|
@ -122,9 +122,11 @@ def download_log():
|
|||
@route(base_url + 'image_proxy/<url:path>', 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]
|
||||
|
||||
img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/' + url).content))
|
||||
apikey = get_sonarr_settings()[2]
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue