mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 15:13:39 +02:00
Generator erroneously used as list
This commit is contained in:
parent
e3edc50f77
commit
8433f1d7a8
3 changed files with 5 additions and 5 deletions
|
|
@ -1072,8 +1072,8 @@ def create_query(self, log, title=None, authors=None, identifiers={}, # {{{
|
|||
q['field-title'] = ' '.join(title_tokens)
|
||||
terms.extend(title_tokens)
|
||||
if authors:
|
||||
author_tokens = self.get_author_tokens(authors,
|
||||
only_first_author=True)
|
||||
author_tokens = list(self.get_author_tokens(authors,
|
||||
only_first_author=True))
|
||||
if author_tokens:
|
||||
q['field-author'] = ' '.join(author_tokens)
|
||||
terms.extend(author_tokens)
|
||||
|
|
|
|||
|
|
@ -196,8 +196,8 @@ def build_term(prefix, parts):
|
|||
title_tokens = list(self.get_title_tokens(title))
|
||||
if title_tokens:
|
||||
q += build_term('title', title_tokens)
|
||||
author_tokens = self.get_author_tokens(authors,
|
||||
only_first_author=True)
|
||||
author_tokens = list(self.get_author_tokens(authors,
|
||||
only_first_author=True))
|
||||
if author_tokens:
|
||||
q += ((' ' if q != '' else '') +
|
||||
build_term('author', author_tokens))
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ def build_term(prefix, parts):
|
|||
title_tokens = list(self.get_title_tokens(title))
|
||||
if title_tokens:
|
||||
q += build_term('title', title_tokens)
|
||||
author_tokens = self.get_author_tokens(authors, only_first_author=True)
|
||||
author_tokens = list(self.get_author_tokens(authors, only_first_author=True))
|
||||
if author_tokens:
|
||||
q += ('+' if q else '') + build_term('author', author_tokens)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue