mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-20 06:02:12 +00:00
fix: force lowercase comparisons
This commit is contained in:
parent
03bceb7ef2
commit
b111357b45
2 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "3.1.5",
|
||||
"version": "3.1.6",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
"main": "src/index.js",
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ export function alEntry (filemedia) {
|
|||
|
||||
function getDistanceFromTitle (media, name) {
|
||||
if (media) {
|
||||
const distances = [...Object.values(media.title), ...media.synonyms].filter(v => v).map(title => lavenshtein(title, name))
|
||||
const distances = [...Object.values(media.title), ...media.synonyms].filter(v => v).map(title => lavenshtein(title.toLowerCase(), name.toLowerCase()))
|
||||
const min = distances.reduce((prev, curr) => prev < curr ? prev : curr)
|
||||
media.lavenshtein = min
|
||||
return media
|
||||
|
|
|
|||
Loading…
Reference in a new issue