Fixed bug with Reader exhaustion

This commit is contained in:
Artyom Belousov 2021-02-07 16:21:21 +03:00
parent d8a295be75
commit 425f0fd56d
6 changed files with 18 additions and 42 deletions

View file

@ -23,7 +23,7 @@ func (f *Fetcher) GetOriginalName(name string) string {
path := scryfallUrl + "/cards/named?fuzzy=" + applyFilters(name)
result := getCardByUrl(path)
if result == "" && f.Dict != nil {
result, _ = dicttranslate.FindFromReader(name, f.Dict, 5)
result, _ = dicttranslate.Find(name, f.Dict, 5)
}
return result
}