Skip to content
Snippets Groups Projects
Commit 7d421a76 authored by Dmitry Shelepnev's avatar Dmitry Shelepnev
Browse files

Fix error in sopdscan.py (split authors and change position for last and first names)

parent ecf08130
Branches
Tags
No related merge requests found
...@@ -231,7 +231,7 @@ class opdsScanner: ...@@ -231,7 +231,7 @@ class opdsScanner:
for a in book_data.authors: for a in book_data.authors:
author_name = a.get('name',_('Unknown author')).strip(strip_symbols) author_name = a.get('name',_('Unknown author')).strip(strip_symbols)
# Если в имени автора нет запятой, то фамилию переносим из конца в начало # Если в имени автора нет запятой, то фамилию переносим из конца в начало
if author_name.find(',')<0: if author_name and author_name.find(',')<0:
author_names = author_name.split() author_names = author_name.split()
author_name = ' '.join([author_names[-1],' '.join(author_names[:-1])]) author_name = ' '.join([author_names[-1],' '.join(author_names[:-1])])
author=opdsdb.addauthor(author_name) author=opdsdb.addauthor(author_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment