This commit is contained in:
Thomas 2021-01-09 09:21:26 +01:00
parent 6e6187175a
commit 346656e53d
1 changed files with 4 additions and 1 deletions

View File

@ -1525,7 +1525,10 @@ public class RetrofitPeertubeAPI {
}
try {
RequestBody displayName = RequestBody.create(playlistParams.getDisplayName(), MediaType.parse("text/plain"));
RequestBody description = RequestBody.create(playlistParams.getDescription(), MediaType.parse("text/plain"));
RequestBody description = null;
if (playlistParams.getDescription() != null) {
description = RequestBody.create(playlistParams.getDescription(), MediaType.parse("text/plain"));
}
RequestBody channelId = RequestBody.create(playlistParams.getVideoChannelId(), MediaType.parse("text/plain"));
if (apiAction == PlaylistsVM.action.CREATE_PLAYLIST) {
Call<VideoPlaylistData.VideoPlaylistCreation> stringCall = peertubeService.addPlaylist(getToken(), displayName, description, playlistParams.getPrivacy(), channelId, bodyThumbnail);