mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
Remove unused code...
This commit is contained in:
@@ -5,10 +5,8 @@ using SharpCompress.Archive.Tar;
|
||||
using SharpCompress.Common;
|
||||
using SharpCompress.Reader;
|
||||
using SharpCompress.Reader.Zip;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Common.Implementations.Archiving
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ using MediaBrowser.Common.Implementations.ScheduledTasks;
|
||||
using MediaBrowser.Common.Implementations.Security;
|
||||
using MediaBrowser.Common.Implementations.Serialization;
|
||||
using MediaBrowser.Common.Implementations.Updates;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.Progress;
|
||||
@@ -251,7 +250,7 @@ namespace MediaBrowser.Common.Implementations
|
||||
progress.Report(15);
|
||||
|
||||
var innerProgress = new ActionableProgress<double>();
|
||||
innerProgress.RegisterAction(p => progress.Report((.8 * p) + 15));
|
||||
innerProgress.RegisterAction(p => progress.Report(.8 * p + 15));
|
||||
|
||||
await RegisterResources(innerProgress).ConfigureAwait(false);
|
||||
|
||||
@@ -661,7 +660,7 @@ namespace MediaBrowser.Common.Implementations
|
||||
{
|
||||
try
|
||||
{
|
||||
return Assembly.Load(File.ReadAllBytes((file)));
|
||||
return Assembly.Load(File.ReadAllBytes(file));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Common.Implementations.Configuration
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Common.Implementations.Devices
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Common.IO;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.ScheduledTasks;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.ScheduledTasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -57,7 +55,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
|
||||
public Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
|
||||
{
|
||||
// Delete log files more than n days old
|
||||
var minDateModified = DateTime.UtcNow.AddDays(-(ConfigurationManager.CommonConfiguration.LogFileRetentionDays));
|
||||
var minDateModified = DateTime.UtcNow.AddDays(-ConfigurationManager.CommonConfiguration.LogFileRetentionDays);
|
||||
|
||||
var filesToDelete = _fileSystem.GetFiles(ConfigurationManager.CommonApplicationPaths.LogDirectoryPath, true)
|
||||
.Where(f => _fileSystem.GetLastWriteTimeUtc(f) < minDateModified)
|
||||
|
||||
@@ -103,11 +103,11 @@ namespace MediaBrowser.Common.Implementations.Security
|
||||
}
|
||||
catch (DirectoryNotFoundException)
|
||||
{
|
||||
(File.Create(licenseFile)).Close();
|
||||
File.Create(licenseFile).Close();
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
(File.Create(licenseFile)).Close();
|
||||
File.Create(licenseFile).Close();
|
||||
}
|
||||
}
|
||||
if (contents != null && contents.Length > 0)
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace MediaBrowser.Common.Implementations.Security
|
||||
};
|
||||
|
||||
record.TrialVersion = IsInTrial(reg.expDate, record.RegChecked, record.IsRegistered);
|
||||
record.IsValid = !record.RegChecked || (record.IsRegistered || record.TrialVersion);
|
||||
record.IsValid = !record.RegChecked || record.IsRegistered || record.TrialVersion;
|
||||
|
||||
return record;
|
||||
}
|
||||
@@ -314,7 +314,7 @@ namespace MediaBrowser.Common.Implementations.Security
|
||||
|
||||
var isInTrial = expirationDate > DateTime.UtcNow;
|
||||
|
||||
return (isInTrial && !isRegistered);
|
||||
return isInTrial && !isRegistered;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CommonIO;
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Collections.Concurrent;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Common.Implementations.Serialization
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Events;
|
||||
using MediaBrowser.Common.Implementations.Security;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.Progress;
|
||||
@@ -200,7 +199,7 @@ namespace MediaBrowser.Common.Implementations.Updates
|
||||
{
|
||||
var packages = _jsonSerializer.DeserializeFromStream<List<PackageInfo>>(stream).ToList();
|
||||
|
||||
if ((DateTime.UtcNow - _lastPackageUpdateTime) > GetCacheLength())
|
||||
if (DateTime.UtcNow - _lastPackageUpdateTime > GetCacheLength())
|
||||
{
|
||||
UpdateCachedPackages(CancellationToken.None, false);
|
||||
}
|
||||
@@ -233,7 +232,7 @@ namespace MediaBrowser.Common.Implementations.Updates
|
||||
|
||||
try
|
||||
{
|
||||
if ((DateTime.UtcNow - _lastPackageUpdateTime) < GetCacheLength())
|
||||
if (DateTime.UtcNow - _lastPackageUpdateTime < GetCacheLength())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user