removed unneeded cast

This commit is contained in:
Holger Müller 2022-06-20 20:55:00 +02:00
parent eca136dabe
commit c71bc1212a
No known key found for this signature in database
GPG Key ID: 016F07C42F7AC2B1
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ fun <T : SubsonicResponse> Response<T>.throwOnFailure(): Response<T> {
val response = this
if (response.isSuccessful && response.body()!!.status === SubsonicResponse.Status.OK) {
return this as Response<T>
return this
}
if (!response.isSuccessful) {
throw IOException("Server error, code: " + response.code())