aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/Html/scripts/site.js
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-03-14 15:52:53 -0400
committerLukePulverenti <luke.pulverenti@gmail.com>2013-03-14 15:52:53 -0400
commitfe1834e6be044f0fdbe68fb34122c680f29ae04d (patch)
treed5ec27cc5835dd05d15551523b2fa93870dfbd4a /MediaBrowser.WebDashboard/Html/scripts/site.js
parenta7f06c84b14ea79ce5af8e928597f6fd119088a3 (diff)
Add resume capability to GetTempFile
Diffstat (limited to 'MediaBrowser.WebDashboard/Html/scripts/site.js')
-rw-r--r--MediaBrowser.WebDashboard/Html/scripts/site.js29
1 files changed, 16 insertions, 13 deletions
diff --git a/MediaBrowser.WebDashboard/Html/scripts/site.js b/MediaBrowser.WebDashboard/Html/scripts/site.js
index cb4ba3bdd..75521f9fd 100644
--- a/MediaBrowser.WebDashboard/Html/scripts/site.js
+++ b/MediaBrowser.WebDashboard/Html/scripts/site.js
@@ -397,23 +397,26 @@ var Dashboard = {
if (!info.HasPendingRestart) {
Dashboard.reloadPage();
} else {
- Dashboard.reloadPageWhenServerAvailable(retryCount);
+ Dashboard.retryReload(retryCount);
}
- }).fail(function () {
-
- setTimeout(function () {
+ }).fail(function() {
+ Dashboard.retryReload(retryCount);
+ });
+ },
+
+ retryReload: function (retryCount) {
+ setTimeout(function () {
- retryCount = retryCount || 0;
- retryCount++;
+ retryCount = retryCount || 0;
+ retryCount++;
- if (retryCount < 10) {
- Dashboard.reloadPageWhenServerAvailable(retryCount);
- } else {
- Dashboard.suppressAjaxErrors = false;
- }
- }, 500);
- });
+ if (retryCount < 10) {
+ Dashboard.reloadPageWhenServerAvailable(retryCount);
+ } else {
+ Dashboard.suppressAjaxErrors = false;
+ }
+ }, 500);
},
getPosterViewHtml: function (options) {