Remove no longer needed safe call.
This commit is contained in:
parent
7b7f470667
commit
8ebd53a8eb
|
@ -320,7 +320,7 @@ class EditServerFragment : Fragment(), OnBackPressedHandler {
|
||||||
// Execute a ping to retrieve the API version.
|
// Execute a ping to retrieve the API version.
|
||||||
// This is accepted to fail if the authentication is incorrect yet.
|
// This is accepted to fail if the authentication is incorrect yet.
|
||||||
var pingResponse = subsonicApiClient.api.ping().execute()
|
var pingResponse = subsonicApiClient.api.ping().execute()
|
||||||
if (pingResponse?.body() != null) {
|
if (pingResponse.body() != null) {
|
||||||
val restApiVersion = pingResponse.body()!!.version.restApiVersion
|
val restApiVersion = pingResponse.body()!!.version.restApiVersion
|
||||||
currentServerSetting!!.minimumApiVersion = restApiVersion
|
currentServerSetting!!.minimumApiVersion = restApiVersion
|
||||||
Timber.i("Server minimum API version set to %s", restApiVersion)
|
Timber.i("Server minimum API version set to %s", restApiVersion)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class ApiCallResponseChecker(
|
||||||
if (activeServerProvider.getActiveServer().minimumApiVersion == null) {
|
if (activeServerProvider.getActiveServer().minimumApiVersion == null) {
|
||||||
try {
|
try {
|
||||||
val response = subsonicAPIClient.api.ping().execute()
|
val response = subsonicAPIClient.api.ping().execute()
|
||||||
if (response?.body() != null) {
|
if (response.body() != null) {
|
||||||
val restApiVersion = response.body()!!.version.restApiVersion
|
val restApiVersion = response.body()!!.version.restApiVersion
|
||||||
Timber.i("Server minimum API version set to %s", restApiVersion)
|
Timber.i("Server minimum API version set to %s", restApiVersion)
|
||||||
activeServerProvider.setMinimumApiVersion(restApiVersion)
|
activeServerProvider.setMinimumApiVersion(restApiVersion)
|
||||||
|
|
Loading…
Reference in New Issue