diff --git a/nerochan/models.py b/nerochan/models.py index f68a801..ee4097d 100644 --- a/nerochan/models.py +++ b/nerochan/models.py @@ -114,20 +114,18 @@ class Artwork(pw.Model): _frames = thumbnails(frames) _image = next(_frames) _image.info = image.info - - _image.save(t, format=image.format, save_all=True, append_images=list(_frames), disposal=2) + _image.save(t, save_all=True, append_images=list(_frames), disposal=2) else: image.thumbnail(size, Image.ANTIALIAS) if self.nsfw: image = image.filter(ImageFilter.GaussianBlur(radius = 4)) image.save(t, format=image.format) - - image.close() self.thumbnail = _t self.save() return True - except: + except Exception as e: + print(e) return False class Meta: diff --git a/nerochan/templates/artwork/show.html b/nerochan/templates/artwork/show.html index deb3e80..7c5b813 100644 --- a/nerochan/templates/artwork/show.html +++ b/nerochan/templates/artwork/show.html @@ -11,19 +11,16 @@

{{ artwork.description }}

- {% if not artwork.approved %} - {% if artwork.hidden %} - - {% else %} - - {% endif %} - - - {% endif %} {% if current_user.is_authenticated and current_user.is_admin %} - - - + + {% endif %} + {% if not artwork.approved %} + {% if artwork.hidden %} + + {% else %} + + {% endif %} + {% endif %}