allow basic thumbnail recreation
This commit is contained in:
+3
-1
@@ -404,7 +404,7 @@ class SeriesBase(models.Model):
|
||||
else:
|
||||
return format_html('", "'.join(images))
|
||||
|
||||
def get_thumbnail(self):
|
||||
def get_thumbnail(self, recreate=False):
|
||||
images = self.images.filter(removed=False)
|
||||
|
||||
if len(images) < 1:
|
||||
@@ -413,6 +413,8 @@ class SeriesBase(models.Model):
|
||||
img = findMiddle(images).image
|
||||
try:
|
||||
thumbnailer = get_thumbnailer(img)
|
||||
if recreate:
|
||||
thumbnailer.delete_thumbnails()
|
||||
thumbnail = thumbnailer["exam-list"]
|
||||
except InvalidImageFormatError:
|
||||
return format_html(
|
||||
|
||||
Reference in New Issue
Block a user