diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Channels')
3 files changed, 10 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs b/MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs index f13c71c6d..c98f71ce2 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelImageProvider.cs @@ -47,7 +47,7 @@ namespace MediaBrowser.Server.Implementations.Channels return ((ChannelManager)_channelManager).GetChannelProvider(channel); } - public bool HasChanged(IHasMetadata item, MetadataStatus status, IDirectoryService directoryService) + public bool HasChanged(IHasMetadata item, IDirectoryService directoryService) { return GetSupportedImages(item).Any(i => !item.HasImage(i)); } diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs index d849ce7bd..c9956c68a 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs @@ -1,5 +1,4 @@ using MediaBrowser.Common.Extensions; -using MediaBrowser.Common.IO; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Configuration; @@ -122,7 +121,7 @@ namespace MediaBrowser.Server.Implementations.Channels { try { - return (GetChannelProvider(i) is ISupportsLatestMedia) == val; + return GetChannelProvider(i) is ISupportsLatestMedia == val; } catch { @@ -403,7 +402,7 @@ namespace MediaBrowser.Server.Implementations.Channels var val = width.Value; var res = list - .OrderBy(i => (i.Width.HasValue && i.Width.Value <= val ? 0 : 1)) + .OrderBy(i => i.Width.HasValue && i.Width.Value <= val ? 0 : 1) .ThenBy(i => Math.Abs((i.Width ?? 0) - val)) .ThenByDescending(i => i.Width ?? 0) .ThenBy(list.IndexOf) @@ -1407,7 +1406,8 @@ namespace MediaBrowser.Server.Implementations.Channels throw new ArgumentNullException("channel"); } - var result = GetAllChannels().FirstOrDefault(i => string.Equals(GetInternalChannelId(i.Name).ToString("N"), channel.ChannelId, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Name, channel.Name, StringComparison.OrdinalIgnoreCase)); + var result = GetAllChannels() + .FirstOrDefault(i => string.Equals(GetInternalChannelId(i.Name).ToString("N"), channel.ChannelId, StringComparison.OrdinalIgnoreCase) || string.Equals(i.Name, channel.Name, StringComparison.OrdinalIgnoreCase)); if (result == null) { diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs b/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs index 08783ae8d..b25c9c818 100644 --- a/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs +++ b/MediaBrowser.Server.Implementations/Channels/ChannelPostScanTask.cs @@ -44,7 +44,7 @@ namespace MediaBrowser.Server.Implementations.Channels var startingPercent = numComplete * percentPerUser * 100; var innerProgress = new ActionableProgress<double>(); - innerProgress.RegisterAction(p => progress.Report(startingPercent + (percentPerUser * p))); + innerProgress.RegisterAction(p => progress.Report(startingPercent + percentPerUser * p)); await DownloadContent(user, cancellationToken, innerProgress).ConfigureAwait(false); @@ -97,7 +97,7 @@ namespace MediaBrowser.Server.Implementations.Channels innerProgress.RegisterAction(p => { double innerPercent = startingNumberComplete; - innerPercent += (p / 100); + innerPercent += p / 100; innerPercent /= numItems; progress.Report(innerPercent * 100); }); @@ -232,9 +232,9 @@ namespace MediaBrowser.Server.Implementations.Channels innerProgress.RegisterAction(p => { double innerPercent = startingNumberComplete; - innerPercent += (p / 100); + innerPercent += p / 100; innerPercent /= numItems; - progress.Report((innerPercent * 50) + 50); + progress.Report(innerPercent * 50 + 50); }); await GetAllItems(user, channelId, folder, currentRefreshLevel + 1, maxRefreshLevel, innerProgress, cancellationToken).ConfigureAwait(false); @@ -247,7 +247,7 @@ namespace MediaBrowser.Server.Implementations.Channels numComplete++; double percent = numComplete; percent /= numItems; - progress.Report((percent * 50) + 50); + progress.Report(percent * 50 + 50); } } |
