forgot to scale on forced generate. Now fixed

This commit is contained in:
FrederikBaerentsen 2023-01-20 15:25:38 +01:00
parent 3ba034ea02
commit 892bfc21bd

View File

@ -79,9 +79,9 @@ def generate():
generated = generated + 1 generated = generated + 1
elif Path(config.THUMBNAIL_DIR + "/" + str(CVDB) + ".jpg").exists() == False: elif Path(config.THUMBNAIL_DIR + "/" + str(CVDB) + ".jpg").exists() == False:
cover = s.open(filelist[1]).read() cover = s.open(filelist[1]).read()
c = open(config.THUMBNAIL_DIR + "/" + str(CVDB) + ".jpg", 'wb+') image = Image.open(BytesIO(cover))
c.write(cover) image.thumbnail(config.MAXSIZE,Image.ANTIALIAS)
c.close() image.save(config.THUMBNAIL_DIR + "/" + str(CVDB) + ".jpg")
generated = generated + 1 generated = generated + 1
else: else:
skippedcount = skippedcount + 1 skippedcount = skippedcount + 1