diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-26 23:19:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-26 23:19:05 -0500 |
| commit | 3751e14eb1b7a0815b6ab7c2164c262e4723c52e (patch) | |
| tree | 4acac5381745de703ff0ea65bee049cf6e0e4f5b /MediaBrowser.WebDashboard/Html/scripts | |
| parent | a6596042a67e2d846f74542d72e81b87d1521a5d (diff) | |
restored audio
Diffstat (limited to 'MediaBrowser.WebDashboard/Html/scripts')
| -rw-r--r-- | MediaBrowser.WebDashboard/Html/scripts/site.js | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/MediaBrowser.WebDashboard/Html/scripts/site.js b/MediaBrowser.WebDashboard/Html/scripts/site.js index d5479b3ede..ae6cbbf053 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/site.js +++ b/MediaBrowser.WebDashboard/Html/scripts/site.js @@ -568,16 +568,16 @@ var Dashboard = { Dashboard.showLoadingMsg();
var promise;
-
+
if (path === "Network") {
- promise = ApiClient.getNetworkComputers();
- }
+ promise = ApiClient.getNetworkComputers();
+ }
else if (path) {
- promise = ApiClient.getDirectoryContents(path, { includeDirectories: true });
- } else {
+ promise = ApiClient.getDirectoryContents(path, { includeDirectories: true });
+ } else {
promise = ApiClient.getDrives();
- }
-
+ }
+
promise.done(function (folders) {
$('#txtDirectoryPickerPath', page).val(path || "");
@@ -633,7 +633,30 @@ var Dashboard = { getPluginSecurityInfo: function () {
if (!Dashboard.getPluginSecurityInfoPromise) {
- Dashboard.getPluginSecurityInfoPromise = ApiClient.getPluginSecurityInfo();
+
+ var deferred = $.Deferred();
+
+ // Don't let this blow up the dashboard when it fails
+ $.ajax({
+ type: "GET",
+ url: ApiClient.getUrl("Plugins/SecurityInfo"),
+ dataType: 'json',
+
+ error: function () {
+ // Don't show normal dashboard errors
+ }
+
+ }).done(function (result) {
+ deferred.resolveWith(null, [[result]]);
+ }).fail(function () {
+
+ console.log('Error getting plugin security info');
+
+ deferred.resolveWith(null, [[{ IsMBSupporter: false }]]);
+
+ });
+
+ Dashboard.getPluginSecurityInfoPromise = deferred;
}
return Dashboard.getPluginSecurityInfoPromise;
|
