mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-22 05:51:10 +00:00
WIP
This commit is contained in:
parent
bdcca17c57
commit
e2b65c2468
1 changed files with 2 additions and 3 deletions
|
@ -490,12 +490,11 @@ def image_proxy(url):
|
|||
@login_required
|
||||
def image_proxy_movies(url):
|
||||
apikey = settings.radarr.apikey
|
||||
url_image = url_radarr() + '/' + url + '?apikey=' + apikey
|
||||
try:
|
||||
url_image = (url_radarr() + '/' + url + '?apikey=' + apikey).replace('/fanart.jpg', '/banner.jpg')
|
||||
req = requests.get(url_image, stream=True, timeout=15, verify=False)
|
||||
except:
|
||||
url_image = url_radarr_short() + '/' + url + '?apikey=' + apikey
|
||||
req = requests.get(url_image, stream=True, timeout=15, verify=False)
|
||||
return None
|
||||
else:
|
||||
return Response(stream_with_context(req.iter_content(2048)), content_type=req.headers['content-type'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue