mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Migrate API changes to apiclient repo
This commit is contained in:
parent
d8cfe064e6
commit
2655b4dca3
1 changed files with 0 additions and 25 deletions
|
@ -356,31 +356,6 @@ define(["events", "appStorage"], function(events, appStorage) {
|
||||||
instance.onAuthenticated ? instance.onAuthenticated(instance, result).then(afterOnAuthenticated) : afterOnAuthenticated()
|
instance.onAuthenticated ? instance.onAuthenticated(instance, result).then(afterOnAuthenticated) : afterOnAuthenticated()
|
||||||
}, reject)
|
}, reject)
|
||||||
})
|
})
|
||||||
}, ApiClient.prototype.quickConnect = function (token) {
|
|
||||||
if (!token) return Promise.reject();
|
|
||||||
var url = this.getUrl("Users/AuthenticateWithQuickConnect");
|
|
||||||
var instance = this;
|
|
||||||
return new Promise(function(resolve, reject) {
|
|
||||||
var postData = {
|
|
||||||
Token: token
|
|
||||||
};
|
|
||||||
instance.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: url,
|
|
||||||
data: JSON.stringify(postData),
|
|
||||||
dataType: "json",
|
|
||||||
contentType: "application/json"
|
|
||||||
}).then(function(result) {
|
|
||||||
var afterOnAuthenticated = function() {
|
|
||||||
redetectBitrate(instance);
|
|
||||||
return resolve(result);
|
|
||||||
};
|
|
||||||
instance.onAuthenticated ? instance.onAuthenticated(instance, result).then(afterOnAuthenticated) : afterOnAuthenticated()
|
|
||||||
}, reject)
|
|
||||||
})
|
|
||||||
}, ApiClient.prototype.getQuickConnect = function(verb) {
|
|
||||||
var url = this.getUrl("/QuickConnect/" + verb);
|
|
||||||
return this.getJSON(url);
|
|
||||||
}, ApiClient.prototype.ensureWebSocket = function() {
|
}, ApiClient.prototype.ensureWebSocket = function() {
|
||||||
if (!this.isWebSocketOpenOrConnecting() && this.isWebSocketSupported()) try {
|
if (!this.isWebSocketOpenOrConnecting() && this.isWebSocketSupported()) try {
|
||||||
this.openWebSocket()
|
this.openWebSocket()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue