fix crash if media is not found in tmdb
This commit is contained in:
parent
d76538cf28
commit
a505315781
|
@ -76,7 +76,7 @@ class TMDBApiController {
|
||||||
it.asJsonObject.get("title")?.asString
|
it.asJsonObject.get("title")?.asString
|
||||||
}
|
}
|
||||||
|
|
||||||
return@withContext sortedResults.first().asJsonObject?.get("id")?.asInt ?: -1
|
return@withContext sortedResults.firstOrNull()?.asJsonObject?.get("id")?.asInt ?: -1
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("BlockingMethodInNonBlockingContext")
|
@Suppress("BlockingMethodInNonBlockingContext")
|
||||||
|
|
Loading…
Reference in New Issue