calibredb: Fix set_metadata not working for the series_index field. Fixes #1329724 [Calibredb setting of series_index does not work](https://bugs.launchpad.net/calibre/+bug/1329724)

This commit is contained in:
Kovid Goyal 2014-06-13 17:49:39 +05:30
parent 7e6691caa3
commit 504d83630d

View File

@ -667,6 +667,8 @@ def command_set_metadata(args, dbpath):
print >>sys.stderr, 'Cannot set index for series before setting the series name'
raise SystemExit(1)
mi.set(field[:-6], sname, extra=val)
if field == 'series_index':
mi.series_index = val # extra has no effect for the builtin series field
else:
mi.set(field, val)
db.set_metadata(book_id, mi, force_changes=True)