mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix problem with passing strings instead of lists for standard is_multiple fields
This commit is contained in:
parent
5e2296e59e
commit
4d45950392
@ -317,7 +317,11 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
v = apply_pattern(val).strip()
|
v = apply_pattern(val).strip()
|
||||||
if v:
|
if v:
|
||||||
res.append(v)
|
res.append(v)
|
||||||
val = fm['is_multiple'].join(res)
|
val = res
|
||||||
|
if fm['is_custom']:
|
||||||
|
# The standard tags and authors values want to be lists.
|
||||||
|
# All custom columns are to be strings
|
||||||
|
val = fm['is_multiple'].join(val)
|
||||||
else:
|
else:
|
||||||
val = apply_pattern(val)
|
val = apply_pattern(val)
|
||||||
|
|
||||||
@ -330,8 +334,6 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
setter = self.db.set_comment
|
setter = self.db.set_comment
|
||||||
else:
|
else:
|
||||||
setter = getattr(self.db, 'set_'+field)
|
setter = getattr(self.db, 'set_'+field)
|
||||||
if field == 'authors':
|
|
||||||
val = string_to_authors(val)
|
|
||||||
setter(id, val, notify=False, commit=False)
|
setter(id, val, notify=False, commit=False)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user