diff --git a/MediaBrowser.Api/Playback/TranscodingThrottler.cs b/MediaBrowser.Api/Playback/TranscodingThrottler.cs
index f94d5d837..fec3dda86 100644
--- a/MediaBrowser.Api/Playback/TranscodingThrottler.cs
+++ b/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
{
diff --git a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
index 94c91c55a..b3a7f70bd 100644
--- a/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
+++ b/MediaBrowser.Common.Implementations/HttpClientManager/HttpClientManager.cs
@@ -723,9 +723,20 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
/// System.String.
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;
}
///
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
index 9a013e2e7..5e992d9db 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
+++ b/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();
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index 48cd3f234..92a3f5c16 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -126,6 +126,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest