From c6f4c17a81aae1d7102abe5a4051bfc6e03be620 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 5 Sep 2018 17:45:51 -0700 Subject: [PATCH] Remove polling flag --- data/interfaces/default/js/script.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/data/interfaces/default/js/script.js b/data/interfaces/default/js/script.js index 56986e22..36a38773 100644 --- a/data/interfaces/default/js/script.js +++ b/data/interfaces/default/js/script.js @@ -592,7 +592,6 @@ function PlexOAuth(success, error, pre) { getPlexOAuthPin().then(function (data) { const pin = data.pin; 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; @@ -604,7 +603,6 @@ function PlexOAuth(success, error, pre) { headers: x_plex_headers, success: function (data) { if (data.authToken){ - keep_polling = false; closePlexOAuthWindow(); if (typeof success === "function") { success(data.authToken) @@ -612,14 +610,13 @@ function PlexOAuth(success, error, pre) { } }, error: function () { - keep_polling = false; closePlexOAuthWindow(); if (typeof error === "function") { error() } }, complete: function () { - if (keep_polling && !plex_oauth_window.closed){ + if (!plex_oauth_window.closed){ poll(); } else { clearTimeout(polling);