1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-30 14:53:01 +00:00

Fix pdf cover

Fix massadding books
Add feature inform of duplicate books
This commit is contained in:
Ozzieisaacs
2019-11-26 08:19:03 +01:00
parent ab5873984e
commit 78f9ee86b1
7 changed files with 136 additions and 34 deletions

View File

@@ -567,6 +567,12 @@ def upload():
filepath = os.path.join(config.config_calibre_dir, author_dir, title_dir)
saved_filename = os.path.join(filepath, title_dir + meta.extension.lower())
if unicode(title) != u'Unknown' and unicode(authr) != u'Unknown':
entry = helper.check_exists_book(authr, title)
if entry:
book_html = flash(_(u"Uploaded book probably exists in the library, consider to change before upload new: ")
+ Markup(render_title_template('book_exists_flash.html', entry=entry)), category="warning")
# check if file path exists, otherwise create it, copy file to calibre path and delete temp file
if not os.path.exists(filepath):
try: