mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Try to detect if a book file has been edited outside of calibre and serve the updated copy
This commit is contained in:
parent
6fc6abc263
commit
b086766064
@ -131,7 +131,7 @@ def book_manifest(ctx, rd, book_id, fmt):
|
||||
if not ctx.has_id(rd, db, book_id):
|
||||
raise BookNotFound(book_id, db)
|
||||
with db.safe_read_lock:
|
||||
fm = db.format_metadata(book_id, fmt)
|
||||
fm = db.format_metadata(book_id, fmt, allow_cache=False)
|
||||
if not fm:
|
||||
raise HTTPNotFound('No %s format for the book (id:%s) in the library: %s' % (fmt, book_id, library_id))
|
||||
size, mtime = map(int, (fm['size'], time.mktime(fm['mtime'].utctimetuple())*10))
|
||||
|
Loading…
x
Reference in New Issue
Block a user