1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Use new SyncPlay API client

This commit is contained in:
MrTimscampi 2020-07-07 18:20:53 +02:00
parent cc30828734
commit 2a15569e57
2 changed files with 9 additions and 9 deletions

View file

@ -37,7 +37,7 @@ function showNewJoinGroupSelection (button, user, apiClient) {
console.debug('No item is currently playing.');
}
apiClient.sendSyncPlayCommand('ListGroups').then(function (response) {
apiClient.getSyncPlayGroups().then(function (response) {
response.json().then(function (groups) {
var menuItems = groups.map(function (group) {
return {
@ -83,9 +83,9 @@ function showNewJoinGroupSelection (button, user, apiClient) {
actionsheet.show(menuOptions).then(function (id) {
if (id == 'new-group') {
apiClient.sendSyncPlayCommand('NewGroup');
apiClient.createSyncPlayGroup();
} else {
apiClient.sendSyncPlayCommand('JoinGroup', {
apiClient.joinSyncPlayGroup({
GroupId: id,
PlayingItemId: playingItemId
});
@ -140,7 +140,7 @@ function showLeaveGroupSelection (button, user, apiClient) {
actionsheet.show(menuOptions).then(function (id) {
if (id == 'leave-group') {
apiClient.sendSyncPlayCommand('LeaveGroup');
apiClient.leaveSyncPlayGroup();
}
}).catch((error) => {
console.error('SyncPlay: unexpected error showing group menu:', error);