mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
Remove unused code...
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user