Use new subsonic api updatePlaylist call.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
Yahor Berdnikau 2017-09-03 10:35:04 +02:00
parent 8bf9399e48
commit 0e8c853dbf

View File

@ -606,18 +606,16 @@ public class RESTMusicService implements MusicService
} }
@Override @Override
public void updatePlaylist(String id, String name, String comment, boolean pub, Context context, ProgressListener progressListener) throws Exception public void updatePlaylist(String id,
{ String name,
checkServerVersion(context, "1.8", "Updating playlists is not supported."); String comment,
Reader reader = getReader(context, progressListener, "updatePlaylist", null, asList("playlistId", "name", "comment", "public"), Arrays.<Object>asList(id, name, comment, pub)); boolean pub,
try Context context,
{ ProgressListener progressListener) throws Exception {
new ErrorParser(context).parse(reader); updateProgressListener(progressListener, R.string.parser_reading);
} Response<SubsonicResponse> response = subsonicAPIClient.getApi()
finally .updatePlaylist(Long.valueOf(id), name, comment, pub, null, null).execute();
{ checkResponseSuccessful(response);
Util.close(reader);
}
} }
@Override @Override