mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 01:35:10 +01:00
Optimzing Mass-Migration
This commit is contained in:
parent
b872ab837a
commit
504a10a6eb
@ -61,6 +61,9 @@ class SmartSearchEngine(parentContext: CoroutineContext,
|
||||
} else title
|
||||
val searchResults = source.fetchSearchManga(1, searchQuery, FilterList()).toSingle().await(Schedulers.io())
|
||||
|
||||
if (searchResults.mangas.size == 1)
|
||||
return@supervisorScope listOf(SearchEntry(searchResults.mangas.first(), 0.0))
|
||||
|
||||
searchResults.mangas.map {
|
||||
val normalizedDistance = normalizedLevenshtein.similarity(title, it.title)
|
||||
SearchEntry(it, normalizedDistance)
|
||||
|
Loading…
Reference in New Issue
Block a user