Change vertical bars to commas in author names

This commit is contained in:
Charles Haley 2010-09-18 15:01:31 +01:00
parent 9615a637ee
commit 9139da12eb

View File

@ -220,6 +220,8 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
if val: if val:
val.sort(cmp=lambda x,y: cmp(x.lower(), y.lower())) val.sort(cmp=lambda x,y: cmp(x.lower(), y.lower()))
val = val[0] val = val[0]
if txt == 'authors':
val = val.replace('|', ',')
else: else:
val = '' val = ''
else: else:
@ -303,6 +305,8 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
# The standard tags and authors values want to be lists. # The standard tags and authors values want to be lists.
# All custom columns are to be strings # All custom columns are to be strings
val = fm['is_multiple'].join(val) val = fm['is_multiple'].join(val)
elif field == 'authors':
val = [v.replace('|', ',') for v in val]
else: else:
val = apply_pattern(val) val = apply_pattern(val)