fix crash if media is not found in tmdb
This commit is contained in:
parent
6ca1ea63fe
commit
528e74fda4
|
@ -76,7 +76,7 @@ class TMDBApiController {
|
|||
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")
|
||||
|
|
Loading…
Reference in New Issue