1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2025-02-16 11:41:16 +01:00

Add two ToDos

This commit is contained in:
tzugen 2021-06-08 17:20:45 +02:00
parent be356d9c0a
commit 4eeff191aa
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,7 @@ class SubsonicAPIClient(
api.getAvatar(username).execute()
}
// TODO: Move this to response checker
private inline fun handleStreamResponse(apiCall: () -> Response<ResponseBody>): StreamResponse {
val response = apiCall()
return if (response.isSuccessful) {

View File

@ -736,6 +736,7 @@ open class RESTMusicService(
private const val INDEXES_STORAGE_NAME = "indexes"
private const val ARTISTS_STORAGE_NAME = "artists"
// TODO: Move to response checker
@Throws(SubsonicRESTException::class, IOException::class)
fun checkStreamResponseError(response: StreamResponse) {
if (response.hasError() || response.stream == null) {