mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 18:08:17 -07:00
Merge pull request #1475 from crobibero/syncplay-api
remove sessionId parameter from api calls
This commit is contained in:
commit
6ca47a891b
@ -66,7 +66,7 @@
|
||||
"hls.js": "^0.13.1",
|
||||
"howler": "^2.2.0",
|
||||
"intersection-observer": "^0.10.0",
|
||||
"jellyfin-apiclient": "^1.2.2",
|
||||
"jellyfin-apiclient": "^1.3.0",
|
||||
"jellyfin-noto": "https://github.com/jellyfin/jellyfin-noto",
|
||||
"jquery": "^3.5.1",
|
||||
"jstree": "^3.3.10",
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
|
@ -6273,10 +6273,10 @@ isurl@^1.0.0-alpha5:
|
||||
has-to-string-tag-x "^1.2.0"
|
||||
is-object "^1.0.1"
|
||||
|
||||
jellyfin-apiclient@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/jellyfin-apiclient/-/jellyfin-apiclient-1.2.2.tgz#64f058320603df02d926f4c1b929b42c6acc4527"
|
||||
integrity sha512-UwC56orm4darWlnNQJ1nbKo+W8ywlheJSJC6d9zm06CslYtOc/Dkv9kz2PadQEh+6EiBsB0hAZCc7FJ9ahOoGQ==
|
||||
jellyfin-apiclient@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/jellyfin-apiclient/-/jellyfin-apiclient-1.3.0.tgz#428ec998ef17a755a7c07f6284f6eb4a56a63242"
|
||||
integrity sha512-jq+erwtg175Vg/VnxPdMIc+R2e0+t22T42tJiirMU84xBgk+h3maJar7Umr5NHyfkbt6J8d0TmR2O7nXwVpR+w==
|
||||
|
||||
"jellyfin-noto@https://github.com/jellyfin/jellyfin-noto":
|
||||
version "1.0.3"
|
||||
|
Loading…
Reference in New Issue
Block a user