From 23eaee1f4ca9733b3d181eafa04713c1576bf4d4 Mon Sep 17 00:00:00 2001 From: hexated Date: Wed, 15 Mar 2023 11:40:12 +0700 Subject: [PATCH] small fix --- SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 58cbede8..b2004bcc 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -731,11 +731,12 @@ suspend fun searchWatchOnline( imdbId: String? = null, tmdbId: Int? = null, ): NiceResponse? { + val wTitle = title?.dropLast(1) // weird but this will make search working val mediaId = app.get( if (season == null) { - "${watchOnlineAPI}/api/v1/movies?filters[q]=$title" + "${watchOnlineAPI}/api/v1/movies?filters[q]=$wTitle" } else { - "${watchOnlineAPI}/api/v1/shows?filters[q]=$title" + "${watchOnlineAPI}/api/v1/shows?filters[q]=$wTitle" } ).parsedSafe()?.items?.find { it.imdb_id == imdbId || it.tmdb_id == tmdbId || it.imdb_id == imdbId?.removePrefix("tt")