mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
small fix
This commit is contained in:
parent
bf3c03ce71
commit
23eaee1f4c
1 changed files with 3 additions and 2 deletions
|
@ -731,11 +731,12 @@ suspend fun searchWatchOnline(
|
||||||
imdbId: String? = null,
|
imdbId: String? = null,
|
||||||
tmdbId: Int? = null,
|
tmdbId: Int? = null,
|
||||||
): NiceResponse? {
|
): NiceResponse? {
|
||||||
|
val wTitle = title?.dropLast(1) // weird but this will make search working
|
||||||
val mediaId = app.get(
|
val mediaId = app.get(
|
||||||
if (season == null) {
|
if (season == null) {
|
||||||
"${watchOnlineAPI}/api/v1/movies?filters[q]=$title"
|
"${watchOnlineAPI}/api/v1/movies?filters[q]=$wTitle"
|
||||||
} else {
|
} else {
|
||||||
"${watchOnlineAPI}/api/v1/shows?filters[q]=$title"
|
"${watchOnlineAPI}/api/v1/shows?filters[q]=$wTitle"
|
||||||
}
|
}
|
||||||
).parsedSafe<WatchOnlineSearch>()?.items?.find {
|
).parsedSafe<WatchOnlineSearch>()?.items?.find {
|
||||||
it.imdb_id == imdbId || it.tmdb_id == tmdbId || it.imdb_id == imdbId?.removePrefix("tt")
|
it.imdb_id == imdbId || it.tmdb_id == tmdbId || it.imdb_id == imdbId?.removePrefix("tt")
|
||||||
|
|
Loading…
Reference in a new issue