mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server home page: When showing recently read books from across devices hide the entries for which loading the cover fails
This commit is contained in:
parent
c7c9c79157
commit
ba6a7bbccd
@ -132,12 +132,12 @@ def show_recent_for_user(container_id):
|
|||||||
if item.cfi:
|
if item.cfi:
|
||||||
q.bookpos = item.cfi
|
q.bookpos = item.cfi
|
||||||
url_to_read = open_book_url(item.book_id, item.format, q)
|
url_to_read = open_book_url(item.book_id, item.format, q)
|
||||||
|
img = E.img(alt=item.tooltip, src=absolute_path(f'get/cover/{item.book_id}/{item.library_id}'))
|
||||||
images.appendChild(E.div(style='margin: 0 1em',
|
images.appendChild(E.div(style='margin: 0 1em',
|
||||||
E.a(
|
E.a(title=item.tooltip, href=url_to_read, img)))
|
||||||
title=item.tooltip,
|
img.onerror = def(err):
|
||||||
href=url_to_read,
|
failed = err.target
|
||||||
E.img(alt=item.tooltip, src=absolute_path(f'get/cover/{item.book_id}/{item.library_id}'))
|
failed.parentNode.parentNode.style.display = 'none'
|
||||||
)))
|
|
||||||
|
|
||||||
|
|
||||||
def show_recent_stage2(books):
|
def show_recent_stage2(books):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user