Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
Updated MetadataSearchResult to show the book title, author, and publishing year rather than just the title.  This should improve the end user's ability to find the correct match rather than providing just the title which may have multiple results by various authors.
  • Loading branch information
twojciac authored May 12, 2021
1 parent 9b1de6b commit 480944c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,9 @@ def search(self, results, media, lang, manual):
self.Log('Final result:')
i = 1
for r in info:
description = '\"%s\" by %s [%s]' % (r['title'], r['artist'], r['year'])
self.Log(' [%s] %s. %s (%s) %s {%s} [%s]', r['score'], i, r['title'], r['year'], r['artist'], r['id'], r['thumb'])
results.Append(MetadataSearchResult(id = r['id'], name = r['title'], score = r['score'], thumb = r['thumb'], lang = lang))
results.Append(MetadataSearchResult(id = r['id'], name = description, score = r['score'], thumb = r['thumb'], lang = lang))

# If there are more than one result, and this one has a score that is >= GOOD SCORE, then ignore the rest of the results
if not manual and len(info) > 1 and r['score'] >= GOOD_SCORE:
Expand Down

0 comments on commit 480944c

Please # to comment.