mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 02:23:43 +02:00
Fix #1109 (Unhandled Error - Saving a file to an SD card)
This commit is contained in:
parent
1aaafb6919
commit
f55ff7d782
2 changed files with 5 additions and 2 deletions
|
|
@ -326,7 +326,10 @@ def get_preferred_formats(self, rows, formats, paths=False):
|
|||
ans = []
|
||||
for row in (row.row() for row in rows):
|
||||
format = None
|
||||
db_formats = set(self.db.formats(row).lower().split(','))
|
||||
fmts = self.db.formats(row)
|
||||
if not fmts:
|
||||
return []
|
||||
db_formats = set(fmts.lower().split(','))
|
||||
available_formats = set([f.lower() for f in formats])
|
||||
u = available_formats.intersection(db_formats)
|
||||
for f in formats:
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ def all_formats(self):
|
|||
return set([f[0] for f in formats])
|
||||
|
||||
def formats(self, index, index_is_id=False):
|
||||
''' Return available formats as a comma separated list or None if htere are no available formats '''
|
||||
''' Return available formats as a comma separated list or None if there are no available formats '''
|
||||
id = index if index_is_id else self.id(index)
|
||||
path = os.path.join(self.library_path, self.path(id, index_is_id=True))
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue