Skip to content

Commit

Permalink
Reduce score by one point for each position on results
Browse files Browse the repository at this point in the history
- prevents top result being lost amongst equally scored

(I think plex does not honour the sort order when equally scored)
  • Loading branch information
jmeosbn committed Jan 7, 2018
1 parent 416ca7a commit 7470ace
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def search(self, results, media, lang, manual):
self.Log('* Thumb is %s', thumb)

if score >= LCL_IGNORE_SCORE:
score = score - (i - 1) # reduce score by one point for each position on results
info.append({'id': itemId, 'title': title, 'year': year, 'date': date, 'score': score, 'thumb': thumb, 'artist' : author})
else:
self.Log('# Score is below ignore boundary (%s)... Skipping!', LCL_IGNORE_SCORE)
Expand Down

0 comments on commit 7470ace

Please sign in to comment.