mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove sort from Search and replace destination fields and add it to source fields. S&R is no longer marked experimental
This commit is contained in:
commit
4e64686684
@ -240,13 +240,13 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
self.writable_fields = ['']
|
self.writable_fields = ['']
|
||||||
fm = self.db.field_metadata
|
fm = self.db.field_metadata
|
||||||
for f in fm:
|
for f in fm:
|
||||||
if (f in ['author_sort'] or (
|
if (f in ['author_sort'] or
|
||||||
fm[f]['datatype'] in ['text', 'series'])
|
(fm[f]['datatype'] in ['text', 'series']
|
||||||
and fm[f].get('search_terms', None)
|
and fm[f].get('search_terms', None)
|
||||||
and f not in ['formats', 'ondevice']):
|
and f not in ['formats', 'ondevice', 'sort'])):
|
||||||
self.all_fields.append(f)
|
self.all_fields.append(f)
|
||||||
self.writable_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.append(f)
|
||||||
self.all_fields.sort()
|
self.all_fields.sort()
|
||||||
self.writable_fields.sort()
|
self.writable_fields.sort()
|
||||||
@ -274,7 +274,6 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
self.main_heading = _(
|
self.main_heading = _(
|
||||||
'<b>You can destroy your library using this feature.</b> '
|
'<b>You can destroy your library using this feature.</b> '
|
||||||
'Changes are permanent. There is no undo function. '
|
'Changes are permanent. There is no undo function. '
|
||||||
' This feature is experimental, and there may be bugs. '
|
|
||||||
'You are strongly encouraged to back up your library '
|
'You are strongly encouraged to back up your library '
|
||||||
'before proceeding.<p>'
|
'before proceeding.<p>'
|
||||||
'Search and replace in text fields using character matching '
|
'Search and replace in text fields using character matching '
|
||||||
@ -338,7 +337,10 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
def s_r_get_field(self, mi, field):
|
def s_r_get_field(self, mi, field):
|
||||||
if field:
|
if field:
|
||||||
fm = self.db.metadata_for_field(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)
|
||||||
if val is None:
|
if val is None:
|
||||||
val = []
|
val = []
|
||||||
elif not fm['is_multiple']:
|
elif not fm['is_multiple']:
|
||||||
|
@ -400,7 +400,7 @@ Future conversion of these books will use the default settings.</string>
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabWidgetPage3">
|
<widget class="QWidget" name="tabWidgetPage3">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>&Search and replace (experimental)</string>
|
<string>&Search and replace</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="vargrid">
|
<layout class="QGridLayout" name="vargrid">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user