diff options
Diffstat (limited to 'MediaBrowser.WebDashboard/Api/DashboardService.cs')
| -rw-r--r-- | MediaBrowser.WebDashboard/Api/DashboardService.cs | 62 |
1 files changed, 46 insertions, 16 deletions
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 371ec818b..7743cc527 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -242,7 +242,24 @@ namespace MediaBrowser.WebDashboard.Api pages = pages.Where(p => p.ConfigurationPageType == request.PageType.Value); } - return ResultFactory.GetOptimizedResult(Request, pages.Select(p => new ConfigurationPageInfo(p)).ToList()); + // Don't allow a failing plugin to fail them all + var configPages = pages.Select(p => + { + + try + { + return new ConfigurationPageInfo(p); + } + catch (Exception ex) + { + Logger.ErrorException("Error getting plugin information from {0}", ex, p.GetType().Name); + return null; + } + }) + .Where(i => i != null) + .ToList(); + + return ResultFactory.GetOptimizedResult(Request, configPages); } /// <summary> @@ -258,7 +275,9 @@ namespace MediaBrowser.WebDashboard.Api // Don't cache if not configured to do so // But always cache images to simulate production - if (!_serverConfigurationManager.Configuration.EnableDashboardResponseCaching && !contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase)) + if (!_serverConfigurationManager.Configuration.EnableDashboardResponseCaching && + !contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase) && + !contentType.StartsWith("font/", StringComparison.OrdinalIgnoreCase)) { return ResultFactory.GetResult(GetResourceStream(path).Result, contentType); } @@ -267,7 +286,7 @@ namespace MediaBrowser.WebDashboard.Api // Cache images unconditionally - updates to image files will require new filename // If there's a version number in the query string we can cache this unconditionally - if (contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase) || !string.IsNullOrEmpty(request.V)) + if (contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase) || contentType.StartsWith("font/", StringComparison.OrdinalIgnoreCase) || !string.IsNullOrEmpty(request.V)) { cacheDuration = TimeSpan.FromDays(365); } @@ -397,8 +416,7 @@ namespace MediaBrowser.WebDashboard.Api var files = new[] { - "http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css", - "thirdparty/jqm-icon-pack-3.0/font-awesome/jqm-icon-pack-3.0.0-fa.css" + versionString, + "thirdparty/jquerymobile-1.4.0/jquery.mobile-1.4.0.min.css", "css/all.css" + versionString }; @@ -423,10 +441,8 @@ namespace MediaBrowser.WebDashboard.Api var files = new[] { - "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js", - "http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js", "scripts/all.js" + versionString, - "thirdparty/jstree1.0/jquery.jstree.js" + "thirdparty/jstree1.0/jquery.jstree.min.js" }; var tags = files.Select(s => string.Format("<script src=\"{0}\"></script>", s)).ToArray(); @@ -449,21 +465,22 @@ namespace MediaBrowser.WebDashboard.Api "extensions.js", "site.js", "librarybrowser.js", + "librarymenu.js", "ratingdialog.js", "aboutpage.js", "allusersettings.js", "alphapicker.js", "addpluginpage.js", "advancedconfigurationpage.js", - "advancedmetadataconfigurationpage.js", + "metadataadvanced.js", "boxsets.js", - "clientsettings.js", + "appsplayback.js", + "appsweather.js", "dashboardpage.js", "directorybrowser.js", "edititemmetadata.js", "edititempeople.js", "edititemimages.js", - "edituserpage.js", "gamesrecommendedpage.js", "gamesystemspage.js", "gamespage.js", @@ -478,9 +495,13 @@ namespace MediaBrowser.WebDashboard.Api "livetvchannel.js", "livetvchannels.js", "livetvguide.js", + "livetvnewrecording.js", + "livetvprogram.js", "livetvrecording.js", "livetvrecordings.js", "livetvtimer.js", + "livetvseriestimer.js", + "livetvseriestimers.js", "livetvtimers.js", "loginpage.js", "logpage.js", @@ -520,11 +541,14 @@ namespace MediaBrowser.WebDashboard.Api "tvshows.js", "tvstudios.js", "tvupcoming.js", - "updatepasswordpage.js", + "useredit.js", + "userpassword.js", "userimagepage.js", "userprofilespage.js", "usersettings.js", + "userparentalcontrol.js", "wizardfinishpage.js", + "wizardimagesettings.js", "wizardservice.js", "wizardstartpage.js", "wizardsettings.js", @@ -532,17 +556,20 @@ namespace MediaBrowser.WebDashboard.Api }; var memoryStream = new MemoryStream(); - var newLineBytes = Encoding.UTF8.GetBytes(Environment.NewLine); + await AppendResource(memoryStream, "thirdparty/jquery-2.0.3.min.js", newLineBytes).ConfigureAwait(false); + await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.0/jquery.mobile-1.4.0.min.js", newLineBytes).ConfigureAwait(false); + + //await AppendResource(memoryStream, "thirdparty/jquery.infinite-scroll-helper.min.js", newLineBytes).ConfigureAwait(false); + var versionString = string.Format("window.dashboardVersion='{0}';", _appHost.ApplicationVersion); var versionBytes = Encoding.UTF8.GetBytes(versionString); await memoryStream.WriteAsync(versionBytes, 0, versionBytes.Length).ConfigureAwait(false); await memoryStream.WriteAsync(newLineBytes, 0, newLineBytes.Length).ConfigureAwait(false); - await AppendResource(memoryStream, "thirdparty/autoNumeric.js", newLineBytes).ConfigureAwait(false); - await AppendResource(memoryStream, "thirdparty/html5slider.js", newLineBytes).ConfigureAwait(false); + await AppendResource(memoryStream, "thirdparty/autonumeric/autoNumeric.min.js", newLineBytes).ConfigureAwait(false); await AppendResource(assembly, memoryStream, "MediaBrowser.WebDashboard.ApiClient.js", newLineBytes).ConfigureAwait(false); @@ -564,6 +591,7 @@ namespace MediaBrowser.WebDashboard.Api var files = new[] { "site.css", + "mediaplayer.css", "librarybrowser.css", "detailtable.css", "posteritem.css", @@ -573,7 +601,9 @@ namespace MediaBrowser.WebDashboard.Api "search.css", "pluginupdates.css", "remotecontrol.css", - "userimage.css" + "userimage.css", + "livetv.css", + "icons.css" }; var memoryStream = new MemoryStream(); |
