mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-14 07:03:50 +00:00
Don't send AZW formats via mail
This commit is contained in:
parent
13a024a77d
commit
e8b2ea873c
@ -88,10 +88,6 @@ def send_mail(book_id, kindle_mail):
|
|||||||
for entry in data:
|
for entry in data:
|
||||||
if entry.format == "MOBI":
|
if entry.format == "MOBI":
|
||||||
formats["mobi"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".mobi")
|
formats["mobi"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".mobi")
|
||||||
if entry.format == "AZW":
|
|
||||||
formats["azw"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".azw")
|
|
||||||
if entry.format == "AZW3":
|
|
||||||
formats["azw3"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".azw3")
|
|
||||||
if entry.format == "EPUB":
|
if entry.format == "EPUB":
|
||||||
formats["epub"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".epub")
|
formats["epub"] = os.path.join(config.DB_ROOT, book.path, entry.name + ".epub")
|
||||||
if entry.format == "PDF":
|
if entry.format == "PDF":
|
||||||
@ -100,11 +96,7 @@ def send_mail(book_id, kindle_mail):
|
|||||||
if len(formats) == 0:
|
if len(formats) == 0:
|
||||||
return "Could not find any formats suitable for sending by email"
|
return "Could not find any formats suitable for sending by email"
|
||||||
|
|
||||||
if 'azw3' in formats:
|
if 'mobi' in formats:
|
||||||
msg.attach(get_attachment(formats['azw3']))
|
|
||||||
elif 'azw' in formats:
|
|
||||||
msg.attach(get_attachment(formats['azw']))
|
|
||||||
elif 'mobi' in formats:
|
|
||||||
msg.attach(get_attachment(formats['mobi']))
|
msg.attach(get_attachment(formats['mobi']))
|
||||||
elif 'epub' in formats:
|
elif 'epub' in formats:
|
||||||
filepath = make_mobi(book.id)
|
filepath = make_mobi(book.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user