Made CodeFactor Fucking Happy

This commit is contained in:
KillerDogeEmpire 2023-02-07 14:52:34 -08:00
parent c7c1f12dad
commit 830fd7ee55

View file

@ -166,10 +166,8 @@ object APIHolder {
private suspend fun getTracker(title: String?, type: String?, year: Int?): Tracker {
val res = app.get("https://api.consumet.org/meta/anilist/$title")
.parsedSafe<AniSearch>()?.results?.find { media ->
(media.title?.english.equals(title, true) || media.title?.romaji.equals(
title,
true
)) || (media.type.equals(type, true) && media.releaseDate == year)
media.title?.english.equals(title, true) || media.title?.romaji.equals( title, true )
|| media.type.equals(type, true) && media.releaseDate == year
}
return Tracker(res?.malId, res?.aniId, res?.image, res?.cover)
}