Skip to content

Commit

Permalink
Merge pull request #10 from djdembeck/patch-1
Browse files Browse the repository at this point in the history
Add author and year to search results
  • Loading branch information
seanap authored Aug 25, 2021
2 parents 184daa1 + 1e566af commit 4e016e6
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 @@ -441,8 +441,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 4e016e6

Please sign in to comment.