diff --git a/title_language.go b/title_language.go index c10c708..283e35b 100644 --- a/title_language.go +++ b/title_language.go @@ -18,7 +18,7 @@ const ( func ParseAnimeTitleLang(str string) (AnimeTitleLang, error) { lang := AnimeTitleLang(strings.TrimSpace(str)) - switch AnimeTitleLangEnglish { + switch lang { case AnimeTitleLangEnglish: return lang, nil case AnimeTitleUserPreferred: @@ -33,7 +33,7 @@ func ParseAnimeTitleLang(str string) (AnimeTitleLang, error) { } func (atl AnimeTitleLang) GetTitle(anime *anilist.Media) string { - switch AnimeTitleLangEnglish { + switch atl { case AnimeTitleLangEnglish: return anime.Title.English case AnimeTitleUserPreferred: