musikr: fix fscovers scoring logic
This commit is contained in:
parent
a3722acb5a
commit
273dc971ba
1 changed files with 2 additions and 2 deletions
|
@ -136,9 +136,9 @@ class MutableFSCovers(private val context: Context) : MutableCovers<FDCover> {
|
||||||
// Multiply the score for preferred formats & extensions. Weirder formats are harder for
|
// Multiply the score for preferred formats & extensions. Weirder formats are harder for
|
||||||
// android to decode, but not the end of the world.
|
// android to decode, but not the end of the world.
|
||||||
score *=
|
score *=
|
||||||
max(preferredFormats.indexOfFirst { file.mimeType.equals(it, ignoreCase = true) }, 1)
|
preferredFormats.indexOfFirst { file.mimeType.equals(it, ignoreCase = true) } + 2
|
||||||
score *=
|
score *=
|
||||||
max(preferredExtensions.indexOfFirst { extension.equals(it, ignoreCase = true) }, 1)
|
preferredExtensions.indexOfFirst { extension.equals(it, ignoreCase = true) } + 2
|
||||||
return score
|
return score
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue