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:
|
if opts.field:
|
||||||
fields = {k:v for k, v in fields()}
|
fields = {k:v for k, v in fields()}
|
||||||
|
fields['title_sort'] = fields['sort']
|
||||||
vals = {}
|
vals = {}
|
||||||
for x in opts.field:
|
for x in opts.field:
|
||||||
field, val = x.partition(':')[::2]
|
field, val = x.partition(':')[::2]
|
||||||
|
if field == 'sort':
|
||||||
|
field = 'title_sort'
|
||||||
if field not in fields:
|
if field not in fields:
|
||||||
print >>sys.stderr, _('%s is not a known field'%field)
|
print >>sys.stderr, _('%s is not a known field'%field)
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user