forked from recloudstream/cloudstream
Made CodeFactor Fucking Happy
This commit is contained in:
parent
c7c1f12dad
commit
830fd7ee55
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue