Browse Source

Add further resources to complete WebPath

Joshua Boniface 6 years ago
parent
commit
132ce3ece1

+ 6 - 0
Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs

@@ -35,6 +35,12 @@ namespace Emby.Server.Implementations.AppBase
         /// <value>The program data path.</value>
         /// <value>The program data path.</value>
         public string ProgramDataPath { get; private set; }
         public string ProgramDataPath { get; private set; }
 
 
+        /// <summary>
+        /// Gets the path to the web resources folder
+        /// </summary>
+        /// <value>The web resources path.</value>
+        public string WebPath { get; set; }
+
         /// <summary>
         /// <summary>
         /// Gets the path to the system folder
         /// Gets the path to the system folder
         /// </summary>
         /// </summary>

+ 3 - 1
Emby.Server.Implementations/ApplicationHost.cs

@@ -621,7 +621,7 @@ namespace Emby.Server.Implementations
             string contentRoot = ServerConfigurationManager.Configuration.DashboardSourcePath;
             string contentRoot = ServerConfigurationManager.Configuration.DashboardSourcePath;
             if (string.IsNullOrEmpty(contentRoot))
             if (string.IsNullOrEmpty(contentRoot))
             {
             {
-                contentRoot = Path.Combine(ServerConfigurationManager.ApplicationPaths,WebPath, "src");
+                contentRoot = Path.Combine(ServerConfigurationManager.ApplicationPaths.WebPath, "src");
             }
             }
 
 
             var host = new WebHostBuilder()
             var host = new WebHostBuilder()
@@ -921,6 +921,7 @@ namespace Emby.Server.Implementations
             logger.LogInformation("User Interactive: {IsUserInteractive}", Environment.UserInteractive);
             logger.LogInformation("User Interactive: {IsUserInteractive}", Environment.UserInteractive);
             logger.LogInformation("Processor count: {ProcessorCount}", Environment.ProcessorCount);
             logger.LogInformation("Processor count: {ProcessorCount}", Environment.ProcessorCount);
             logger.LogInformation("Program data path: {ProgramDataPath}", appPaths.ProgramDataPath);
             logger.LogInformation("Program data path: {ProgramDataPath}", appPaths.ProgramDataPath);
+            logger.LogInformation("Web resources path: {WebPath}", appPaths.WebPath);
             logger.LogInformation("Application directory: {ApplicationPath}", appPaths.ProgramSystemPath);
             logger.LogInformation("Application directory: {ApplicationPath}", appPaths.ProgramSystemPath);
         }
         }
 
 
@@ -1393,6 +1394,7 @@ namespace Emby.Server.Implementations
                 CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
                 CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
                 Id = SystemId,
                 Id = SystemId,
                 ProgramDataPath = ApplicationPaths.ProgramDataPath,
                 ProgramDataPath = ApplicationPaths.ProgramDataPath,
+                WebPath = ApplicationPaths.WebPath,
                 LogPath = ApplicationPaths.LogDirectoryPath,
                 LogPath = ApplicationPaths.LogDirectoryPath,
                 ItemsByNamePath = ApplicationPaths.InternalMetadataPath,
                 ItemsByNamePath = ApplicationPaths.InternalMetadataPath,
                 InternalMetadataPath = ApplicationPaths.InternalMetadataPath,
                 InternalMetadataPath = ApplicationPaths.InternalMetadataPath,

+ 6 - 0
Emby.Server.Implementations/ServerApplicationPaths.cs

@@ -35,6 +35,12 @@ namespace Emby.Server.Implementations
         /// <value>The root folder path.</value>
         /// <value>The root folder path.</value>
         public string RootFolderPath => Path.Combine(ProgramDataPath, "root");
         public string RootFolderPath => Path.Combine(ProgramDataPath, "root");
 
 
+/*        /// <summary>
+        /// Gets the path to the Web resources
+        /// </summary>
+        /// <value>The web folder path.</value>
+        public string WebPath => WebPath; */
+
         /// <summary>
         /// <summary>
         /// Gets the path to the default user view directory.  Used if no specific user view is defined.
         /// Gets the path to the default user view directory.  Used if no specific user view is defined.
         /// </summary>
         /// </summary>

+ 1 - 1
Jellyfin.Server/Program.cs

@@ -277,7 +277,7 @@ namespace Jellyfin.Server
                 if (string.IsNullOrEmpty(webDir))
                 if (string.IsNullOrEmpty(webDir))
                 {
                 {
                     // Use default location under ResourcesPath
                     // Use default location under ResourcesPath
-                    webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web")
+                    webDir = Path.Combine(AppContext.BaseDirectory, "jellyfin-web");
                 }
                 }
             }
             }
 
 

+ 6 - 0
MediaBrowser.Common/Configuration/IApplicationPaths.cs

@@ -11,6 +11,12 @@ namespace MediaBrowser.Common.Configuration
         /// <value>The program data path.</value>
         /// <value>The program data path.</value>
         string ProgramDataPath { get; }
         string ProgramDataPath { get; }
 
 
+        /// <summary>
+        /// Gets the path to the web resources folder
+        /// </summary>
+        /// <value>The web resources path.</value>
+        string WebPath { get; }
+
         /// <summary>
         /// <summary>
         /// Gets the path to the program system folder
         /// Gets the path to the program system folder
         /// </summary>
         /// </summary>

+ 6 - 0
MediaBrowser.Model/System/SystemInfo.cs

@@ -83,6 +83,12 @@ namespace MediaBrowser.Model.System
         /// <value>The program data path.</value>
         /// <value>The program data path.</value>
         public string ProgramDataPath { get; set; }
         public string ProgramDataPath { get; set; }
 
 
+        /// <summary>
+        /// Gets or sets the web resources path.
+        /// </summary>
+        /// <value>The web resources path.</value>
+        public string WebPath { get; set; }
+
         /// <summary>
         /// <summary>
         /// Gets or sets the items by name path.
         /// Gets or sets the items by name path.
         /// </summary>
         /// </summary>