소스 검색

update startup wizard

Luke Pulverenti 9 년 전
부모
커밋
19796847d8
2개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 3
      MediaBrowser.WebDashboard/Api/DashboardService.cs
  2. 7 2
      MediaBrowser.WebDashboard/Api/PackageCreator.cs

+ 1 - 3
MediaBrowser.WebDashboard/Api/DashboardService.cs

@@ -198,10 +198,8 @@ namespace MediaBrowser.WebDashboard.Api
 
 
             var contentType = MimeTypes.GetMimeType(path);
             var contentType = MimeTypes.GetMimeType(path);
 
 
-            var isHtml = IsHtml(path);
-
             // Bounce them to the startup wizard if it hasn't been completed yet
             // Bounce them to the startup wizard if it hasn't been completed yet
-            if (isHtml && !_serverConfigurationManager.Configuration.IsStartupWizardCompleted && path.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1)
+            if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted && path.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1 && GetPackageCreator().IsCoreHtml(path))
             {
             {
                 // But don't redirect if an html import is being requested.
                 // But don't redirect if an html import is being requested.
                 if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) == -1 && path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1)
                 if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) == -1 && path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1)

+ 7 - 2
MediaBrowser.WebDashboard/Api/PackageCreator.cs

@@ -61,7 +61,7 @@ namespace MediaBrowser.WebDashboard.Api
                 // jQuery ajax doesn't seem to handle if-modified-since correctly
                 // jQuery ajax doesn't seem to handle if-modified-since correctly
                 if (IsFormat(path, "html"))
                 if (IsFormat(path, "html"))
                 {
                 {
-                    if (IsCoreHtml(path) && path.IndexOf(".template.html", StringComparison.OrdinalIgnoreCase) == -1)
+                    if (IsCoreHtml(path))
                     {
                     {
                         resourceStream = await ModifyHtml(resourceStream, mode, appVersion, localizationCulture, enableMinification).ConfigureAwait(false);
                         resourceStream = await ModifyHtml(resourceStream, mode, appVersion, localizationCulture, enableMinification).ConfigureAwait(false);
                     }
                     }
@@ -222,13 +222,18 @@ namespace MediaBrowser.WebDashboard.Api
             }
             }
         }
         }
 
 
-        private bool IsCoreHtml(string path)
+        public bool IsCoreHtml(string path)
         {
         {
             if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) != -1)
             if (path.IndexOf("vulcanize", StringComparison.OrdinalIgnoreCase) != -1)
             {
             {
                 return false;
                 return false;
             }
             }
 
 
+            if (path.IndexOf(".template.html", StringComparison.OrdinalIgnoreCase) != -1)
+            {
+                return false;
+            }
+
             path = GetDashboardResourcePath(path);
             path = GetDashboardResourcePath(path);
             var parent = Path.GetDirectoryName(path);
             var parent = Path.GetDirectoryName(path);