Luke Pulverenti пре 9 година
родитељ
комит
0ad0150435

+ 4 - 2
MediaBrowser.Model/Configuration/ServerConfiguration.cs

@@ -67,7 +67,7 @@ namespace MediaBrowser.Model.Configuration
         /// </summary>
         /// </summary>
         /// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
         /// <value><c>true</c> if [enable case sensitive item ids]; otherwise, <c>false</c>.</value>
         public bool EnableCaseSensitiveItemIds { get; set; }
         public bool EnableCaseSensitiveItemIds { get; set; }
-        
+
         /// <summary>
         /// <summary>
         /// Gets or sets the metadata path.
         /// Gets or sets the metadata path.
         /// </summary>
         /// </summary>
@@ -155,7 +155,7 @@ namespace MediaBrowser.Model.Configuration
         /// </summary>
         /// </summary>
         /// <value>The dashboard source path.</value>
         /// <value>The dashboard source path.</value>
         public string DashboardSourcePath { get; set; }
         public string DashboardSourcePath { get; set; }
-        
+
         /// <summary>
         /// <summary>
         /// Gets or sets the image saving convention.
         /// Gets or sets the image saving convention.
         /// </summary>
         /// </summary>
@@ -201,12 +201,14 @@ namespace MediaBrowser.Model.Configuration
         public bool EnableFolderView { get; set; }
         public bool EnableFolderView { get; set; }
         public bool EnableGroupingIntoCollections { get; set; }
         public bool EnableGroupingIntoCollections { get; set; }
         public bool DisplaySpecialsWithinSeasons { get; set; }
         public bool DisplaySpecialsWithinSeasons { get; set; }
+        public string[] LocalNetworkAddresses { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
         /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
         /// </summary>
         /// </summary>
         public ServerConfiguration()
         public ServerConfiguration()
         {
         {
+            LocalNetworkAddresses = new string[] { };
             Migrations = new string[] { };
             Migrations = new string[] { };
 
 
             EnableCustomPathSubFolders = true;
             EnableCustomPathSubFolders = true;

+ 1 - 1
MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs

@@ -25,7 +25,7 @@ namespace MediaBrowser.Providers.Music
         private readonly IApplicationHost _appHost;
         private readonly IApplicationHost _appHost;
         private readonly ILogger _logger;
         private readonly ILogger _logger;
 
 
-        public static string MusicBrainzBaseUrl = "https://www.musicbrainz.org";
+        public static string MusicBrainzBaseUrl = "http://musicbrainz.fercasas.com:5000";
 
 
         public MusicBrainzAlbumProvider(IHttpClient httpClient, IApplicationHost appHost, ILogger logger)
         public MusicBrainzAlbumProvider(IHttpClient httpClient, IApplicationHost appHost, ILogger logger)
         {
         {

+ 1 - 1
MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj

@@ -46,7 +46,7 @@
       <HintPath>..\packages\CommonIO.1.0.0.9\lib\net45\CommonIO.dll</HintPath>
       <HintPath>..\packages\CommonIO.1.0.0.9\lib\net45\CommonIO.dll</HintPath>
     </Reference>
     </Reference>
     <Reference Include="Emby.XmlTv, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
     <Reference Include="Emby.XmlTv, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\Emby.XmlTv.1.0.0.50\lib\net45\Emby.XmlTv.dll</HintPath>
+      <HintPath>..\packages\Emby.XmlTv.1.0.0.51\lib\net45\Emby.XmlTv.dll</HintPath>
       <Private>True</Private>
       <Private>True</Private>
     </Reference>
     </Reference>
     <Reference Include="INIFileParser, Version=2.3.0.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
     <Reference Include="INIFileParser, Version=2.3.0.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">

+ 1 - 1
MediaBrowser.Server.Implementations/packages.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
 <packages>
   <package id="CommonIO" version="1.0.0.9" targetFramework="net45" />
   <package id="CommonIO" version="1.0.0.9" targetFramework="net45" />
-  <package id="Emby.XmlTv" version="1.0.0.50" targetFramework="net45" />
+  <package id="Emby.XmlTv" version="1.0.0.51" targetFramework="net45" />
   <package id="ini-parser" version="2.3.0" targetFramework="net45" />
   <package id="ini-parser" version="2.3.0" targetFramework="net45" />
   <package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
   <package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
   <package id="MediaBrowser.Naming" version="1.0.0.51" targetFramework="net45" />
   <package id="MediaBrowser.Naming" version="1.0.0.51" targetFramework="net45" />

+ 30 - 7
MediaBrowser.Server.Startup.Common/ApplicationHost.cs

@@ -833,17 +833,40 @@ namespace MediaBrowser.Server.Startup.Common
 
 
         private IEnumerable<string> GetUrlPrefixes()
         private IEnumerable<string> GetUrlPrefixes()
         {
         {
-            var prefixes = new List<string>
-                {
-                    "http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/"
-                };
+            var hosts = ServerConfigurationManager.Configuration.LocalNetworkAddresses.ToList();
+
+            if (hosts.Count == 0)
+            {
+                hosts.Add("+");
+            }
 
 
-            if (!string.IsNullOrWhiteSpace(CertificatePath))
+            if (!hosts.Contains("+", StringComparer.OrdinalIgnoreCase))
             {
             {
-                prefixes.Add("https://+:" + ServerConfigurationManager.Configuration.HttpsPortNumber + "/");
+                if (!hosts.Contains("localhost", StringComparer.OrdinalIgnoreCase))
+                {
+                    hosts.Add("localhost");
+                }
+
+                if (!hosts.Contains("127.0.0.1", StringComparer.OrdinalIgnoreCase))
+                {
+                    hosts.Add("127.0.0.1");
+                }
             }
             }
 
 
-            return prefixes;
+            return hosts.SelectMany(i =>
+            {
+                var prefixes = new List<string>
+                {
+                    "http://"+i+":" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/"
+                };
+
+                if (!string.IsNullOrWhiteSpace(CertificatePath))
+                {
+                    prefixes.Add("https://" + i + ":" + ServerConfigurationManager.Configuration.HttpsPortNumber + "/");
+                }
+
+                return prefixes;
+            });
         }
         }
 
 
         /// <summary>
         /// <summary>