mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
calibredb: Allow setting fo title sort field
Fixes #1233711 [CalibreDB: title_sort is not a known field](https://bugs.launchpad.net/calibre/+bug/1233711)
This commit is contained in:
parent
0f5f38e746
commit
5ca115eab0
@ -629,9 +629,12 @@ def command_set_metadata(args, dbpath):
|
||||
|
||||
if opts.field:
|
||||
fields = {k:v for k, v in fields()}
|
||||
fields['title_sort'] = fields['sort']
|
||||
vals = {}
|
||||
for x in opts.field:
|
||||
field, val = x.partition(':')[::2]
|
||||
if field == 'sort':
|
||||
field = 'title_sort'
|
||||
if field not in fields:
|
||||
print >>sys.stderr, _('%s is not a known field'%field)
|
||||
return 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user