forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-10-28 19:13:21 +02:00
parent fbab681b43
commit 94d1a7d98d
1 changed files with 3 additions and 4 deletions

View File

@ -621,15 +621,14 @@ def thumbnail_thread(pid):
image_req=x
with Image.open(BytesIO(x.content)) as i:
size = len(i.fp.read())
if size > 8 * 1024 * 1024:
db.close()
return
else:
db.close()
return
if size > 8 * 1024 * 1024:
db.close()
return
name = f'/images/{time.time()}'.replace('.','') + '.webp'
with open(name, "wb") as file: