Update Updater

pull/1296/head
Ozzieisaacs 4 years ago
parent 4eacb21259
commit 0c27ff11b9

@ -964,7 +964,8 @@ def get_updater_status():
"8": _(u'Update failed:') + u' ' + _(u'HTTP Error'),
"9": _(u'Update failed:') + u' ' + _(u'Connection error'),
"10": _(u'Update failed:') + u' ' + _(u'Timeout while establishing connection'),
"11": _(u'Update failed:') + u' ' + _(u'General error')
"11": _(u'Update failed:') + u' ' + _(u'General error'),
"12": _(u'Update failed:') + u' ' + _(u'Update File Could Not be Saved in Temp Dir')
}
status['text'] = text
updater_thread.status = 0

@ -114,6 +114,9 @@ class Updater(threading.Thread):
except (requests.exceptions.RequestException, zipfile.BadZipFile):
self.status = 11
log.info(u'General error')
except (IOError, OSError):
self.status = 12
log.info(u'Update File Could Not be Saved in Temp Dir')
self.pause()
return False

@ -1039,11 +1039,11 @@ def serve_book(book_id, book_format, anyname):
else:
return send_from_directory(os.path.join(config.config_calibre_dir, book.path), data.name + "." + book_format)
@web.route("/download/<int:book_id>/<book_format>")
@web.route("/download/<int:book_id>/<book_format>", defaults={'anyname': 'None'})
@web.route("/download/<int:book_id>/<book_format>/<anyname>")
@login_required_if_no_ano
@download_required
def download_link(book_id, book_format):
def download_link(book_id, book_format, anyname):
return get_download_link(book_id, book_format.lower())

Loading…
Cancel
Save