diff --git a/src/calibre/library/cli.py b/src/calibre/library/cli.py index da1b1e27c6..d5def1a364 100644 --- a/src/calibre/library/cli.py +++ b/src/calibre/library/cli.py @@ -233,7 +233,7 @@ def do_add(db, paths, one_book_per_directory, recurse, add_duplicates, otitle, if not mi.authors: mi.authors = [_('Unknown')] for x in ('title', 'authors', 'isbn', 'tags', 'series'): - val = locals()[x] + val = locals()['o'+x] if val: setattr(mi, x[1:], val) if oseries: mi.series_index = oseries_index @@ -356,7 +356,7 @@ def command_add(args, dbpath): print >>sys.stderr, _('You must specify at least one file to add') return 1 do_add(get_db(dbpath, opts), args[1:], opts.one_book_per_directory, - opts.recurse, opts.duplicates, opts.title, opts.author, opts.isbn, + opts.recurse, opts.duplicates, opts.title, opts.authors, opts.isbn, tags, opts.series, opts.series_index) return 0