mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 00:23:39 +02:00
...
This commit is contained in:
commit
b231920841
2 changed files with 4 additions and 3 deletions
|
|
@ -366,8 +366,7 @@ def available_catalog_formats():
|
|||
def plugin_for_catalog_format(fmt):
|
||||
for plugin in catalog_plugins():
|
||||
if fmt.lower() in plugin.file_types:
|
||||
with plugin:
|
||||
return plugin
|
||||
return plugin
|
||||
|
||||
def device_plugins():
|
||||
for plugin in _initialized_plugins:
|
||||
|
|
|
|||
|
|
@ -656,6 +656,7 @@ def validate_command_line(parser, args, log):
|
|||
|
||||
# Merge options from GUI Preferences
|
||||
'''
|
||||
# Placeholder sample code until we implement GUI preferences
|
||||
from calibre.library.save_to_disk import config
|
||||
c = config()
|
||||
for pref in ['asciiize', 'update_metadata', 'write_opf', 'save_cover']:
|
||||
|
|
@ -690,7 +691,8 @@ def command_catalog(args, dbpath):
|
|||
return 1
|
||||
if opts.verbose:
|
||||
log("library.cli:command_catalog dispatching to plugin %s" % plugin.name)
|
||||
plugin.run(args[1], opts, get_db(dbpath, opts))
|
||||
with plugin:
|
||||
plugin.run(args[1], opts, get_db(dbpath, opts))
|
||||
return 0
|
||||
|
||||
# end of GR additions
|
||||
|
|
|
|||
Loading…
Reference in a new issue