use new default poster, remove black posters from icon cache

This commit is contained in:
j 2016-01-10 12:56:46 +05:30
commit 59a3709f84
6 changed files with 61 additions and 32 deletions

View file

@ -9,7 +9,6 @@ from io import BytesIO
import re
from urllib.parse import unquote
from PIL import Image
import stdnum.isbn
from ox import strip_tags, decode_html
@ -82,12 +81,6 @@ def cover(path):
img = os.path.normpath(os.path.join(os.path.dirname(filename), img))
if img in files:
return use(img)
# fallback return black cover
img = Image.new('RGB', (80, 128))
o = BytesIO()
img.save(o, format='jpeg')
data = o.getvalue()
o.close()
return data
def info(epub):