mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
b231920841
@ -366,8 +366,7 @@ def available_catalog_formats():
|
|||||||
def plugin_for_catalog_format(fmt):
|
def plugin_for_catalog_format(fmt):
|
||||||
for plugin in catalog_plugins():
|
for plugin in catalog_plugins():
|
||||||
if fmt.lower() in plugin.file_types:
|
if fmt.lower() in plugin.file_types:
|
||||||
with plugin:
|
return plugin
|
||||||
return plugin
|
|
||||||
|
|
||||||
def device_plugins():
|
def device_plugins():
|
||||||
for plugin in _initialized_plugins:
|
for plugin in _initialized_plugins:
|
||||||
|
@ -656,6 +656,7 @@ def catalog_option_parser(args):
|
|||||||
|
|
||||||
# Merge options from GUI Preferences
|
# Merge options from GUI Preferences
|
||||||
'''
|
'''
|
||||||
|
# Placeholder sample code until we implement GUI preferences
|
||||||
from calibre.library.save_to_disk import config
|
from calibre.library.save_to_disk import config
|
||||||
c = config()
|
c = config()
|
||||||
for pref in ['asciiize', 'update_metadata', 'write_opf', 'save_cover']:
|
for pref in ['asciiize', 'update_metadata', 'write_opf', 'save_cover']:
|
||||||
@ -690,7 +691,8 @@ def command_catalog(args, dbpath):
|
|||||||
return 1
|
return 1
|
||||||
if opts.verbose:
|
if opts.verbose:
|
||||||
log("library.cli:command_catalog dispatching to plugin %s" % plugin.name)
|
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
|
return 0
|
||||||
|
|
||||||
# end of GR additions
|
# end of GR additions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user