diff --git a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs index 053af4fc6..4efef4470 100644 --- a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs +++ b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs @@ -82,19 +82,24 @@ namespace Emby.Server.Implementations.LiveTv { var width = videoStream.Width ?? 1920; - if (width >= 1900) + if (width >= 3000) + { + videoStream.BitRate = 25000000; + } + + else if (width >= 1900) { videoStream.BitRate = 15000000; } - else if (width >= 1260) + else if (width >= 1200) { - videoStream.BitRate = 3000000; + videoStream.BitRate = 4000000; } else if (width >= 700) { - videoStream.BitRate = 1000000; + videoStream.BitRate = 1500000; } } diff --git a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs index 329f5b8a4..220c503d1 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs @@ -183,19 +183,24 @@ namespace Emby.Server.Implementations.LiveTv { var width = videoStream.Width ?? 1920; - if (width >= 1900) + if (width >= 3000) + { + videoStream.BitRate = 25000000; + } + + else if (width >= 1900) { videoStream.BitRate = 15000000; } - else if (width >= 1260) + else if (width >= 1200) { videoStream.BitRate = 4000000; } else if (width >= 700) { - videoStream.BitRate = 1000000; + videoStream.BitRate = 1500000; } } } diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index c44970ff5..a12976f82 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -256,8 +256,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers { var item = itemResult.Item; - var userDataUserId = _config.GetNfoConfiguration().UserId; - switch (reader.Name) { // DateCreated @@ -792,117 +790,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers break; } - case "watched": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val) && !string.IsNullOrWhiteSpace(userDataUserId)) - { - bool parsedValue; - if (bool.TryParse(val, out parsedValue)) - { - var userData = GetOrAdd(itemResult, userDataUserId); - - userData.Played = parsedValue; - } - } - break; - } - - case "playcount": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val) && !string.IsNullOrWhiteSpace(userDataUserId)) - { - int parsedValue; - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out parsedValue)) - { - var userData = GetOrAdd(itemResult, userDataUserId); - - userData.PlayCount = parsedValue; - - if (parsedValue > 0) - { - userData.Played = true; - } - } - } - break; - } - - case "lastplayed": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val) && !string.IsNullOrWhiteSpace(userDataUserId)) - { - DateTime parsedValue; - if (DateTime.TryParseExact(val, "yyyy-MM-dd HH:mm:ss", _usCulture, DateTimeStyles.AssumeLocal, out parsedValue)) - { - var userData = GetOrAdd(itemResult, userDataUserId); - - userData.LastPlayedDate = parsedValue.ToUniversalTime(); - } - } - break; - } - - case "resume": - { - if (!reader.IsEmptyElement) - { - using (var subtree = reader.ReadSubtree()) - { - if (!string.IsNullOrWhiteSpace(userDataUserId)) - { - var userData = GetOrAdd(itemResult, userDataUserId); - - FetchFromResumeNode(subtree, item, userData); - } - } - } - else - { - reader.Read(); - } - break; - } - - case "isuserfavorite": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val) && !string.IsNullOrWhiteSpace(userDataUserId)) - { - bool parsedValue; - if (bool.TryParse(val, out parsedValue)) - { - var userData = GetOrAdd(itemResult, userDataUserId); - - userData.IsFavorite = parsedValue; - } - } - break; - } - - case "userrating": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val) && !string.IsNullOrWhiteSpace(userDataUserId)) - { - double parsedValue; - if (double.TryParse(val, NumberStyles.Any, _usCulture, out parsedValue)) - { - var userData = GetOrAdd(itemResult, userDataUserId); - - userData.Rating = parsedValue; - } - } - break; - } - default: string readerName = reader.Name; string providerIdValue; @@ -922,50 +809,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers } } - private UserItemData GetOrAdd(MetadataResult result, string userId) - { - return result.GetOrAddUserData(userId); - } - - private void FetchFromResumeNode(XmlReader reader, T item, UserItemData userData) - { - reader.MoveToContent(); - reader.Read(); - - // Loop through each element - while (!reader.EOF && reader.ReadState == ReadState.Interactive) - { - if (reader.NodeType == XmlNodeType.Element) - { - switch (reader.Name) - { - case "position": - { - var val = reader.ReadElementContentAsString(); - - if (!string.IsNullOrWhiteSpace(val)) - { - double parsedValue; - if (double.TryParse(val, NumberStyles.Any, _usCulture, out parsedValue)) - { - userData.PlaybackPositionTicks = TimeSpan.FromSeconds(parsedValue).Ticks; - } - } - break; - } - - default: - reader.Skip(); - break; - } - } - else - { - reader.Read(); - } - } - } - private void FetchFromFileInfoNode(XmlReader reader, T item) { reader.MoveToContent(); diff --git a/SharedVersion.cs b/SharedVersion.cs index ed6c2f688..2e6e90c59 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.12.9")] +[assembly: AssemblyVersion("3.2.12.10")]