Fix bad image downloads
This commit is contained in:
parent
cbc96b425c
commit
0c400fb4d5
|
@ -1,6 +1,6 @@
|
|||
maubot: 0.1.0
|
||||
id: lomion.tmdb
|
||||
version: 1.3.0+scott-1fb64b9
|
||||
version: 1.3.0+scott
|
||||
license: AGPL 3.0
|
||||
modules:
|
||||
- tmdb
|
||||
|
|
|
@ -76,8 +76,11 @@ class TmdbApiSingle(TmdbApi):
|
|||
|
||||
async def query_image_binary(self):
|
||||
if self.poster_url:
|
||||
try:
|
||||
async with self.session.get(self.poster_url) as resp:
|
||||
self.poster_binary = await resp.read()
|
||||
except aiohttp.client_exceptions.ClientConnectorError:
|
||||
self.poster_binary = None
|
||||
else:
|
||||
self.poster_binary = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue