From da837ffbf040051f7c73b407331c5d0f9e9dce90 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 12 Aug 2015 17:39:02 -0400 Subject: update translations --- MediaBrowser.Server.Implementations/Channels/ChannelManager.cs | 2 +- MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations') diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index 179eb5629..fbecaa65d 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -914,7 +914,7 @@ namespace MediaBrowser.Server.Implementations.Channels if (query.Limit.HasValue && query.Limit.Value > channelInfo.MaxPageSize.Value) { - throw new ArgumentException(string.Format("{0} channel only supports a maximum of {1} records at a time.", channel.Name, channelInfo.MaxPageSize.Value)); + query.Limit = Math.Min(query.Limit.Value, channelInfo.MaxPageSize.Value); } providerLimit = query.Limit; diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 331f42185..389eda904 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -20,6 +20,7 @@ using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Serialization; +using MoreLinq; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -878,8 +879,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv var programList = programs.ToList(); var genres = programList.SelectMany(i => i.Genres) + .Where(i => !string.IsNullOrWhiteSpace(i)) .DistinctNames() .Select(i => _libraryManager.GetGenre(i)) + .DistinctBy(i => i.Id) .ToDictionary(i => i.Name, StringComparer.OrdinalIgnoreCase); programs = programList.OrderBy(i => i.HasImage(ImageType.Primary) ? 0 : 1) -- cgit v1.2.3