fix tmdb search for movies
movies don't have name but titles
This commit is contained in:
@ -145,7 +145,7 @@ class MainActivity : AppCompatActivity(), NavigationBarView.OnItemSelectedListen
|
||||
EncryptedPreferences.readCredentials(this)
|
||||
StorageController.load(this)
|
||||
|
||||
// show onbaording
|
||||
// show onboarding
|
||||
if (EncryptedPreferences.password.isEmpty()) {
|
||||
showOnboarding()
|
||||
} else {
|
||||
|
@ -69,7 +69,7 @@ class TMDBApiController {
|
||||
// println(response)
|
||||
|
||||
val sortedResults = response.get("results").asJsonArray.toList().sortedBy {
|
||||
getStringNotNull(it.asJsonObject, "name")
|
||||
getStringNotNull(it.asJsonObject, "title")
|
||||
}
|
||||
|
||||
return@withContext if (sortedResults.isNotEmpty()) {
|
||||
|
Reference in New Issue
Block a user