Skip to content

Commit

Permalink
fix(album-search): ♻️ improve scoring accuracy on books with multiple…
Browse files Browse the repository at this point in the history
… authors
  • Loading branch information
djdembeck committed Oct 7, 2021
1 parent 0119370 commit 319e16f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Contents/Code/__init__.py
Expand Up @@ -551,6 +551,9 @@ def process_results(self, helper, result):

def score_result(self, f, helper, i, info, year):
asin = f['asin']
authors_concat = ', '.join(
author['name'] for author in f['author']
)
author = f['author'][0]['name']
date = f['date']
language = f['language'].title()
Expand All @@ -565,7 +568,7 @@ def score_result(self, f, helper, i, info, year):
if title_score:
all_scores.append(title_score)
# Author name score
author_score = self.score_author(helper, author)
author_score = self.score_author(helper, authors_concat)
if author_score:
all_scores.append(author_score)
# Library language score
Expand Down

0 comments on commit 319e16f

Please sign in to comment.