mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Remove polling flag
This commit is contained in:
parent
1e68a81fe1
commit
c6f4c17a81
1 changed files with 1 additions and 4 deletions
|
@ -592,7 +592,6 @@ function PlexOAuth(success, error, pre) {
|
||||||
getPlexOAuthPin().then(function (data) {
|
getPlexOAuthPin().then(function (data) {
|
||||||
const pin = data.pin;
|
const pin = data.pin;
|
||||||
const code = data.code;
|
const code = data.code;
|
||||||
var keep_polling = true;
|
|
||||||
|
|
||||||
plex_oauth_window.location = 'https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code;
|
plex_oauth_window.location = 'https://app.plex.tv/auth/#!?clientID=' + x_plex_headers['X-Plex-Client-Identifier'] + '&code=' + code;
|
||||||
|
|
||||||
|
@ -604,7 +603,6 @@ function PlexOAuth(success, error, pre) {
|
||||||
headers: x_plex_headers,
|
headers: x_plex_headers,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.authToken){
|
if (data.authToken){
|
||||||
keep_polling = false;
|
|
||||||
closePlexOAuthWindow();
|
closePlexOAuthWindow();
|
||||||
if (typeof success === "function") {
|
if (typeof success === "function") {
|
||||||
success(data.authToken)
|
success(data.authToken)
|
||||||
|
@ -612,14 +610,13 @@ function PlexOAuth(success, error, pre) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
keep_polling = false;
|
|
||||||
closePlexOAuthWindow();
|
closePlexOAuthWindow();
|
||||||
if (typeof error === "function") {
|
if (typeof error === "function") {
|
||||||
error()
|
error()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: function () {
|
complete: function () {
|
||||||
if (keep_polling && !plex_oauth_window.closed){
|
if (!plex_oauth_window.closed){
|
||||||
poll();
|
poll();
|
||||||
} else {
|
} else {
|
||||||
clearTimeout(polling);
|
clearTimeout(polling);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue