fix tmdb search for movies
movies don't have name but titles
This commit is contained in:
parent
c1b0b4038c
commit
664959641f
|
@ -11,7 +11,7 @@ android {
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 4190 //00.04.190
|
versionCode 4190 //00.04.190
|
||||||
versionName "0.4.2-beta1"
|
versionName "0.4.2-beta2"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
resValue "string", "build_time", buildTime()
|
resValue "string", "build_time", buildTime()
|
||||||
|
|
|
@ -145,7 +145,7 @@ class MainActivity : AppCompatActivity(), NavigationBarView.OnItemSelectedListen
|
||||||
EncryptedPreferences.readCredentials(this)
|
EncryptedPreferences.readCredentials(this)
|
||||||
StorageController.load(this)
|
StorageController.load(this)
|
||||||
|
|
||||||
// show onbaording
|
// show onboarding
|
||||||
if (EncryptedPreferences.password.isEmpty()) {
|
if (EncryptedPreferences.password.isEmpty()) {
|
||||||
showOnboarding()
|
showOnboarding()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -69,7 +69,7 @@ class TMDBApiController {
|
||||||
// println(response)
|
// println(response)
|
||||||
|
|
||||||
val sortedResults = response.get("results").asJsonArray.toList().sortedBy {
|
val sortedResults = response.get("results").asJsonArray.toList().sortedBy {
|
||||||
getStringNotNull(it.asJsonObject, "name")
|
getStringNotNull(it.asJsonObject, "title")
|
||||||
}
|
}
|
||||||
|
|
||||||
return@withContext if (sortedResults.isNotEmpty()) {
|
return@withContext if (sortedResults.isNotEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue