From e278e82ed51f2d3a9f85d3aca3d1610dc98e2f85 Mon Sep 17 00:00:00 2001 From: Sofie <117321707+Sofie99@users.noreply.github.com> Date: Tue, 11 Jul 2023 18:49:06 +0700 Subject: [PATCH] add matching with year & type --- app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt index c20786c3..97b75594 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt @@ -199,6 +199,8 @@ object APIHolder { val matchingTypes = types?.any { it.name.equals(media.type, true) } == true matchingTitles && matchingTypes && matchingYears + } ?: search.results?.find { media -> + (year == null || media.releaseDate == year) && types?.any { it.name.equals(media.type, true) } == true } ?: return null Tracker(res.malId, res.aniId, res.image, res.cover)