mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove sessionId parameter from api calls
This commit is contained in:
parent
6a23344871
commit
ed7071015a
2 changed files with 9 additions and 12 deletions
|
@ -37,7 +37,7 @@ function showNewJoinGroupSelection (button, user, apiClient) {
|
|||
console.debug('No item is currently playing.');
|
||||
}
|
||||
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'ListGroups').then(function (response) {
|
||||
apiClient.sendSyncPlayCommand('ListGroups').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(sessionId, 'NewGroup');
|
||||
apiClient.sendSyncPlayCommand('NewGroup');
|
||||
} else {
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'JoinGroup', {
|
||||
apiClient.sendSyncPlayCommand('JoinGroup', {
|
||||
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(sessionId, 'LeaveGroup');
|
||||
apiClient.sendSyncPlayCommand('LeaveGroup');
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error('SyncPlay: unexpected error showing group menu:', error);
|
||||
|
|
|
@ -139,7 +139,7 @@ class SyncPlayManager {
|
|||
return;
|
||||
}
|
||||
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'UpdatePing', {
|
||||
apiClient.sendSyncPlayCommand('UpdatePing', {
|
||||
Ping: ping
|
||||
});
|
||||
}
|
||||
|
@ -447,7 +447,7 @@ class SyncPlayManager {
|
|||
if (!success) {
|
||||
console.warning('Error reporting playback state to server. Joining group will fail.');
|
||||
}
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'JoinGroup', {
|
||||
apiClient.sendSyncPlayCommand('JoinGroup', {
|
||||
GroupId: groupId,
|
||||
PlayingItemId: playingItemId
|
||||
});
|
||||
|
@ -658,8 +658,7 @@ class SyncPlayManager {
|
|||
*/
|
||||
playRequest (player) {
|
||||
var apiClient = connectionManager.currentApiClient();
|
||||
var sessionId = getActivePlayerId();
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'PlayRequest');
|
||||
apiClient.sendSyncPlayCommand('PlayRequest');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -667,8 +666,7 @@ class SyncPlayManager {
|
|||
*/
|
||||
pauseRequest (player) {
|
||||
var apiClient = connectionManager.currentApiClient();
|
||||
var sessionId = getActivePlayerId();
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'PauseRequest');
|
||||
apiClient.sendSyncPlayCommand('PauseRequest');
|
||||
// Pause locally as well, to give the user some little control
|
||||
playbackManager._localUnpause(player);
|
||||
}
|
||||
|
@ -678,8 +676,7 @@ class SyncPlayManager {
|
|||
*/
|
||||
seekRequest (PositionTicks, player) {
|
||||
var apiClient = connectionManager.currentApiClient();
|
||||
var sessionId = getActivePlayerId();
|
||||
apiClient.sendSyncPlayCommand(sessionId, 'SeekRequest', {
|
||||
apiClient.sendSyncPlayCommand('SeekRequest', {
|
||||
PositionTicks: PositionTicks
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue