Parcourir la source

update connect

Luke Pulverenti il y a 10 ans
Parent
commit
00aa3b0de0

+ 3 - 10
MediaBrowser.Api/Playback/TranscodingThrottler.cs

@@ -42,14 +42,7 @@ namespace MediaBrowser.Api.Playback
 
             var options = GetOptions();
 
-            var threshold = options.ThrottleThresholdInSeconds;
-
-            if (!options.EnableThrottling)
-            {
-                threshold *= 2;
-            }
-
-            if (IsThrottleAllowed(_job, threshold))
+            if (options.EnableThrottling && IsThrottleAllowed(_job, options.ThrottleThresholdInSeconds))
             {
                 PauseTranscoding();
             }
@@ -63,7 +56,7 @@ namespace MediaBrowser.Api.Playback
         {
             if (!_isPaused)
             {
-                //_logger.Debug("Sending pause command to ffmpeg");
+                _logger.Debug("Sending pause command to ffmpeg");
 
                 try
                 {
@@ -81,7 +74,7 @@ namespace MediaBrowser.Api.Playback
         {
             if (_isPaused)
             {
-                //_logger.Debug("Sending unpause command to ffmpeg");
+                _logger.Debug("Sending unpause command to ffmpeg");
 
                 try
                 {

+ 14 - 3
MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs

@@ -723,9 +723,20 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
         /// <returns>System.String.</returns>
         private string GetHostFromUrl(string url)
         {
-            var start = url.IndexOf("://", StringComparison.OrdinalIgnoreCase) + 3;
-            var len = url.IndexOf('/', start) - start;
-            return url.Substring(start, len);
+            var index = url.IndexOf("://", StringComparison.OrdinalIgnoreCase);
+
+            if (index != -1)
+            {
+                url = url.Substring(index + 3);
+                var host = url.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
+
+                if (!string.IsNullOrWhiteSpace(host))
+                {
+                    return host;
+                }
+            }
+
+            return url;
         }
 
         /// <summary>

+ 16 - 2
MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs

@@ -137,6 +137,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
             _connection.AddColumn(_logger, "TypedBaseItems", "IsKids", "BIT");
             _connection.AddColumn(_logger, "TypedBaseItems", "CommunityRating", "Float");
             _connection.AddColumn(_logger, "TypedBaseItems", "CustomRating", "Text");
+            _connection.AddColumn(_logger, "TypedBaseItems", "IndexNumber", "INT");
+            _connection.AddColumn(_logger, "TypedBaseItems", "IsLocked", "BIT");
+            _connection.AddColumn(_logger, "TypedBaseItems", "Name", "Text");
+            _connection.AddColumn(_logger, "TypedBaseItems", "OfficialRating", "Text");
 
             PrepareStatements();
 
@@ -166,10 +170,14 @@ namespace MediaBrowser.Server.Implementations.Persistence
                 "IsMovie",
                 "IsSports",
                 "CommunityRating",
-                "CustomRating"
+                "CustomRating",
+                "IndexNumber",
+                "IsLocked",
+                "Name",
+                "OfficialRating"
             };
             _saveItemCommand = _connection.CreateCommand();
-            _saveItemCommand.CommandText = "replace into TypedBaseItems (" + string.Join(",", saveColumns.ToArray()) + ") values (@1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11)";
+            _saveItemCommand.CommandText = "replace into TypedBaseItems (" + string.Join(",", saveColumns.ToArray()) + ") values (@1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15)";
             for (var i = 1; i <= saveColumns.Count; i++)
             {
                 _saveItemCommand.Parameters.Add(_saveItemCommand, "@" + i.ToString(CultureInfo.InvariantCulture));
@@ -276,6 +284,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
                     _saveItemCommand.GetParameter(index++).Value = item.CommunityRating;
                     _saveItemCommand.GetParameter(index++).Value = item.CustomRating;
 
+                    _saveItemCommand.GetParameter(index++).Value = item.IndexNumber;
+                    _saveItemCommand.GetParameter(index++).Value = item.IsLocked;
+
+                    _saveItemCommand.GetParameter(index++).Value = item.Name;
+                    _saveItemCommand.GetParameter(index++).Value = item.OfficialRating;
+                    
                     _saveItemCommand.Transaction = transaction;
 
                     _saveItemCommand.ExecuteNonQuery();

+ 3 - 0
MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj

@@ -126,6 +126,9 @@
     <Content Include="dashboard-ui\thirdparty\cordova\android\localassetmanager.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="dashboard-ui\thirdparty\cordova\ios\orientation.js">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="dashboard-ui\thirdparty\velocity.min.js">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>