mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
GwR changes via CHaley
This commit is contained in:
parent
d823d4244a
commit
3404b367b9
@ -26,14 +26,19 @@ class GenerateCatalogAction(InterfaceAction):
|
||||
rows = xrange(self.gui.library_view.model().rowCount(QModelIndex()))
|
||||
ids = map(self.gui.library_view.model().id, rows)
|
||||
|
||||
dbspec = None
|
||||
if not ids:
|
||||
return error_dialog(self.gui, _('No books selected'),
|
||||
_('No books selected to generate catalog for'),
|
||||
show=True)
|
||||
|
||||
db = self.gui.library_view.model().db
|
||||
dbspec = {}
|
||||
for id in ids:
|
||||
dbspec[id] = {'ondevice':db.ondevice(id, index_is_id=True)}
|
||||
db.catalog_plugin_on_device_temp_mapping = dbspec
|
||||
|
||||
# Calling gui2.tools:generate_catalog()
|
||||
ret = generate_catalog(self.gui, dbspec, ids, self.gui.device_manager)
|
||||
ret = generate_catalog(self.gui, db, ids, self.gui.device_manager)
|
||||
if ret is None:
|
||||
return
|
||||
|
||||
|
@ -104,8 +104,7 @@ class CSV_XML(CatalogPlugin):
|
||||
|
||||
# Output the entry fields
|
||||
for entry in data:
|
||||
print "%s [%s]" % (entry['title'],entry['id'])
|
||||
print "ondevice: %s" % db.ondevice(entry['id'], index_is_id=True)
|
||||
print "%s [%s] ondevice: %s" % (entry['title'],entry['id'], repr(db.catalog_plugin_on_device_temp_mapping[entry['id']]))
|
||||
outstr = []
|
||||
for field in fields:
|
||||
item = entry[field]
|
||||
|
Loading…
x
Reference in New Issue
Block a user