mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 10:13:42 +02:00
GUI: view ebook, open formats that do not have an input plugin because those can be opened with an external viewer.
This commit is contained in:
parent
768f2e5cbf
commit
60bc41b33e
1 changed files with 7 additions and 3 deletions
|
|
@ -1368,8 +1368,8 @@ def view_book(self, triggered):
|
|||
for row in rows:
|
||||
row = row.row()
|
||||
|
||||
formats = self.library_view.model().db.formats(row).lower()
|
||||
formats = set(formats.split(',')).intersection(available_input_formats())
|
||||
formats = self.library_view.model().db.formats(row).upper()
|
||||
formats = formats.split(',')
|
||||
title = self.library_view.model().db.title(row)
|
||||
|
||||
if not formats:
|
||||
|
|
@ -1377,10 +1377,14 @@ def view_book(self, triggered):
|
|||
_('%s has no available formats.')%(title,), show=True)
|
||||
continue
|
||||
|
||||
in_prefs = False
|
||||
for format in prefs['input_format_order']:
|
||||
if format.lower() in formats:
|
||||
if format in formats:
|
||||
in_prefs = True
|
||||
self.view_format(row, format)
|
||||
break
|
||||
if not in_prefs:
|
||||
self.view_format(row, format[0])
|
||||
else:
|
||||
paths = self.current_view().model().paths(rows)
|
||||
for path in paths:
|
||||
|
|
|
|||
Loading…
Reference in a new issue