Skip to content

Commit

Permalink
Merge pull request #1368 from Borewit/feature/improve-audio-torrent-p…
Browse files Browse the repository at this point in the history
…oster-selection

Prevent spectrogram being selected as the poster.
  • Loading branch information
feross authored Apr 30, 2018
2 parents b48d2b1 + bc3cec1 commit 4f41f59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/lib/torrent-poster.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,16 @@ function scoreAudioCoverFile (imgFile) {
folder: 80,
album: 80,
front: 80,
back: 20
back: 20,
spectrogram: -80
}

for (let keyword in relevanceScore) {
if (fileName === keyword) {
return relevanceScore[keyword]
}
if (fileName.indexOf(keyword) !== -1) {
return 0.8 * relevanceScore[keyword]
return relevanceScore[keyword]
}
}
return 0
Expand Down

0 comments on commit 4f41f59

Please sign in to comment.