mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a regression in calibre 5 that broke auto-sync of generated catalogs to devices. Fixes #1901630 [Error when sending catalog to device](https://bugs.launchpad.net/calibre/+bug/1901630)
This commit is contained in:
parent
cfce88ee79
commit
55a13f248a
@ -1352,12 +1352,12 @@ class DeviceMixin(object): # {{{
|
||||
return
|
||||
metadata = self.library_view.model().metadata_for(ids)
|
||||
names = []
|
||||
for mi in metadata:
|
||||
for book_id, mi in zip(ids, metadata):
|
||||
prefix = ascii_filename(mi.title)
|
||||
if not isinstance(prefix, unicode_type):
|
||||
prefix = prefix.decode(preferred_encoding, 'replace')
|
||||
prefix = ascii_filename(prefix)
|
||||
names.append('%s_%d%s'%(prefix, id,
|
||||
names.append('%s_%d%s'%(prefix, book_id,
|
||||
os.path.splitext(files[-1])[1]))
|
||||
self.update_thumbnail(mi)
|
||||
dynamic.set('catalogs_to_be_synced', set())
|
||||
|
Loading…
x
Reference in New Issue
Block a user