mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Store: Handle | in author names for LN,FN records.
This commit is contained in:
parent
0fa9719375
commit
e20624a445
@ -49,14 +49,23 @@ class StoreAction(InterfaceAction):
|
|||||||
return rows[0].row()
|
return rows[0].row()
|
||||||
|
|
||||||
def _get_author(self, row):
|
def _get_author(self, row):
|
||||||
author = ''
|
authors = []
|
||||||
|
|
||||||
if self.gui.current_view() is self.gui.library_view:
|
if self.gui.current_view() is self.gui.library_view:
|
||||||
author = self.gui.library_view.model().authors(row)
|
a = self.gui.library_view.model().authors(row)
|
||||||
|
authors = a.split(',')
|
||||||
else:
|
else:
|
||||||
mi = self.gui.current_view().model().get_book_display_info(row)
|
mi = self.gui.current_view().model().get_book_display_info(row)
|
||||||
author = ' & '.join(mi.authors)
|
authors = mi.authors
|
||||||
|
|
||||||
return author
|
corrected_authors = []
|
||||||
|
for x in authors:
|
||||||
|
a = x.split('|')
|
||||||
|
a.reverse()
|
||||||
|
a = ' '.join(a)
|
||||||
|
corrected_authors.append(a)
|
||||||
|
|
||||||
|
return ' & '.join(corrected_authors)
|
||||||
|
|
||||||
def search_author(self):
|
def search_author(self):
|
||||||
row = self._get_selected_row()
|
row = self._get_selected_row()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user