mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 07:16:28 +01:00
Fix #1740987 [Error: Unhandled exception after search](https://bugs.launchpad.net/calibre/+bug/1740987)
This commit is contained in:
parent
589214ce67
commit
bfcd447b6c
1 changed files with 9 additions and 2 deletions
|
|
@ -316,8 +316,15 @@ def _view_books(self, rows):
|
|||
return
|
||||
|
||||
if self.gui.current_view() is self.gui.library_view:
|
||||
ids = list(map(self.gui.library_view.model().id, rows))
|
||||
self._view_calibre_books(ids)
|
||||
ids = []
|
||||
m = self.gui.library_view.model().id
|
||||
for r in rows:
|
||||
try:
|
||||
ids.append(m(r))
|
||||
except Exception:
|
||||
pass
|
||||
if ids:
|
||||
self._view_calibre_books(ids)
|
||||
else:
|
||||
paths = self.gui.current_view().model().paths(rows)
|
||||
for path in paths:
|
||||
|
|
|
|||
Loading…
Reference in a new issue