From 8bc1f03164ed1daf27768935fc55018c44466f60 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 17 Aug 2024 09:30:52 +0200 Subject: [PATCH] Bugfix generate thumbnails on gdrive --- cps/tasks/thumbnail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/tasks/thumbnail.py b/cps/tasks/thumbnail.py index cc847274..884ae0c3 100644 --- a/cps/tasks/thumbnail.py +++ b/cps/tasks/thumbnail.py @@ -197,7 +197,8 @@ class TaskGenerateCoverThumbnails(CalibreTask): img.format = thumbnail.format img.save(filename=filename) else: - with open(filename, 'rb') as fd: + stream.seek(0) + with open(filename, 'wb') as fd: copyfileobj(stream, fd) except Exception as ex: