mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
remove 'sort' from the search/replace writable fields. Make it work as an input field.
This commit is contained in:
parent
088f5e9552
commit
ce07d4cef1
@ -240,13 +240,13 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||
self.writable_fields = ['']
|
||||
fm = self.db.field_metadata
|
||||
for f in fm:
|
||||
if (f in ['author_sort'] or (
|
||||
fm[f]['datatype'] in ['text', 'series'])
|
||||
and fm[f].get('search_terms', None)
|
||||
and f not in ['formats', 'ondevice']):
|
||||
if (f in ['author_sort'] or
|
||||
(fm[f]['datatype'] in ['text', 'series']
|
||||
and fm[f].get('search_terms', None)
|
||||
and f not in ['formats', 'ondevice', 'sort'])):
|
||||
self.all_fields.append(f)
|
||||
self.writable_fields.append(f)
|
||||
if fm[f]['datatype'] == 'composite':
|
||||
if f in ['sort'] or fm[f]['datatype'] == 'composite':
|
||||
self.all_fields.append(f)
|
||||
self.all_fields.sort()
|
||||
self.writable_fields.sort()
|
||||
@ -338,7 +338,11 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||
def s_r_get_field(self, mi, field):
|
||||
if field:
|
||||
fm = self.db.metadata_for_field(field)
|
||||
val = mi.get(field, None)
|
||||
if field == 'sort':
|
||||
val = mi.get('title_sort', None)
|
||||
else:
|
||||
val = mi.get(field, None)
|
||||
print field, val
|
||||
if val is None:
|
||||
val = []
|
||||
elif not fm['is_multiple']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user