1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-27 20:25:13 +00:00

Added Scheduled Tasks Settings

This commit is contained in:
mmonkey
2021-09-26 02:02:48 -05:00
parent 0bd544704d
commit 26071d4e7a
7 changed files with 147 additions and 68 deletions

View File

@@ -167,9 +167,9 @@ class TaskGenerateCoverThumbnails(CalibreTask):
try:
stream = urlopen(web_content_link)
with Image(file=stream) as img:
height = self.get_thumbnail_height(thumbnail)
height = get_resize_height(thumbnail.resolution)
if img.height > height:
width = self.get_thumbnail_width(height, img)
width = get_resize_width(thumbnail.resolution, img.width, img.height)
img.resize(width=width, height=height, filter='lanczos')
img.format = thumbnail.format
filename = self.cache.get_cache_file_path(thumbnail.filename,
@@ -212,16 +212,6 @@ class TaskGenerateSeriesThumbnails(CalibreTask):
constants.COVER_THUMBNAIL_MEDIUM
]
# get all series
# get all books in series with covers and count >= 4 books
# get the dimensions from the first book in the series & pop the first book from the series list of books
# randomly select three other books in the series
# resize the covers in the sequence?
# create an image sequence from the 4 selected books of the series
# join pairs of books in the series with wand's concat
# join the two sets of pairs with wand's
def run(self, worker_thread):
if self.calibre_db.session and use_IM:
all_series = self.get_series_with_four_plus_books()