mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 09:04:42 +01:00
Remove unused usings
This commit is contained in:
@@ -8,7 +8,6 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Common.Updates;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Authentication;
|
||||
using MediaBrowser.Controller.Devices;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Emby.Server.Implementations.Configuration
|
||||
var newPath = newConfig.MetadataPath;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(newPath)
|
||||
&& !string.Equals(Configuration.MetadataPath, newPath, StringComparison.Ordinal))
|
||||
&& !string.Equals(Configuration.MetadataPath, newPath, StringComparison.Ordinal))
|
||||
{
|
||||
// Validate
|
||||
if (!Directory.Exists(newPath))
|
||||
|
||||
@@ -454,7 +454,7 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
private static string GetSaveItemCommandText()
|
||||
{
|
||||
var saveColumns = new []
|
||||
var saveColumns = new[]
|
||||
{
|
||||
"guid",
|
||||
"type",
|
||||
@@ -560,7 +560,7 @@ namespace Emby.Server.Implementations.Data
|
||||
throw new ArgumentNullException(nameof(item));
|
||||
}
|
||||
|
||||
SaveItems(new [] { item }, cancellationToken);
|
||||
SaveItems(new[] { item }, cancellationToken);
|
||||
}
|
||||
|
||||
public void SaveImages(BaseItem item)
|
||||
@@ -1622,7 +1622,7 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
IEnumerable<MetadataFields> GetLockedFields(string s)
|
||||
{
|
||||
foreach (var i in s.Split(new [] { '|' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
foreach (var i in s.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
{
|
||||
if (Enum.TryParse(i, true, out MetadataFields parsedValue))
|
||||
{
|
||||
@@ -1818,7 +1818,7 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
if (!reader.IsDBNull(index))
|
||||
{
|
||||
item.ProductionLocations = reader.GetString(index).Split(new [] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
|
||||
item.ProductionLocations = reader.GetString(index).Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToArray();
|
||||
}
|
||||
index++;
|
||||
}
|
||||
@@ -2897,8 +2897,8 @@ namespace Emby.Server.Implementations.Data
|
||||
BindSimilarParams(query, statement);
|
||||
BindSearchParams(query, statement);
|
||||
|
||||
// Running this again will bind the params
|
||||
GetWhereClauses(query, statement);
|
||||
// Running this again will bind the params
|
||||
GetWhereClauses(query, statement);
|
||||
|
||||
result.TotalRecordCount = statement.ExecuteQuery().SelectScalarInt().First();
|
||||
}
|
||||
@@ -2925,7 +2925,7 @@ namespace Emby.Server.Implementations.Data
|
||||
prepend.Add(("SearchScore", SortOrder.Descending));
|
||||
prepend.Add((ItemSortBy.SortName, SortOrder.Ascending));
|
||||
}
|
||||
|
||||
|
||||
if (hasSimilar)
|
||||
{
|
||||
prepend.Add(("SimilarityScore", SortOrder.Descending));
|
||||
@@ -3266,8 +3266,8 @@ namespace Emby.Server.Implementations.Data
|
||||
BindSimilarParams(query, statement);
|
||||
BindSearchParams(query, statement);
|
||||
|
||||
// Running this again will bind the params
|
||||
GetWhereClauses(query, statement);
|
||||
// Running this again will bind the params
|
||||
GetWhereClauses(query, statement);
|
||||
|
||||
foreach (var row in statement.ExecuteQuery())
|
||||
{
|
||||
@@ -3288,8 +3288,8 @@ namespace Emby.Server.Implementations.Data
|
||||
BindSimilarParams(query, statement);
|
||||
BindSearchParams(query, statement);
|
||||
|
||||
// Running this again will bind the params
|
||||
GetWhereClauses(query, statement);
|
||||
// Running this again will bind the params
|
||||
GetWhereClauses(query, statement);
|
||||
|
||||
result.TotalRecordCount = statement.ExecuteQuery().SelectScalarInt().First();
|
||||
}
|
||||
@@ -6159,7 +6159,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
||||
item.ColorTransfer = reader[34].ToString();
|
||||
}
|
||||
|
||||
if (item.Type == MediaStreamType.Subtitle){
|
||||
if (item.Type == MediaStreamType.Subtitle)
|
||||
{
|
||||
item.localizedUndefined = _localization.GetLocalizedString("Undefined");
|
||||
item.localizedDefault = _localization.GetLocalizedString("Default");
|
||||
item.localizedForced = _localization.GetLocalizedString("Forced");
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Emby.Server.Implementations.Data
|
||||
IServerApplicationPaths appPaths)
|
||||
: base(logger)
|
||||
{
|
||||
_jsonOptions = JsonDefaults.GetOptions();;
|
||||
_jsonOptions = JsonDefaults.GetOptions(); ;
|
||||
|
||||
DbFilePath = Path.Combine(appPaths.DataPath, "users.db");
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
|
||||
namespace Emby.Server.Implementations.HttpServer
|
||||
|
||||
@@ -587,11 +587,11 @@ namespace Emby.Server.Implementations.IO
|
||||
// some drives on linux have no actual size or are used for other purposes
|
||||
return DriveInfo.GetDrives().Where(d => d.IsReady && d.TotalSize != 0 && d.DriveType != DriveType.Ram)
|
||||
.Select(d => new FileSystemMetadata
|
||||
{
|
||||
Name = d.Name,
|
||||
FullName = d.RootDirectory.FullName,
|
||||
IsDirectory = true
|
||||
}).ToList();
|
||||
{
|
||||
Name = d.Name,
|
||||
FullName = d.RootDirectory.FullName,
|
||||
IsDirectory = true
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public virtual IEnumerable<FileSystemMetadata> GetDirectories(string path, bool recursive = false)
|
||||
|
||||
@@ -8,7 +8,6 @@ using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Controller.Resolvers;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.IO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
@@ -805,17 +805,17 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
// Delete user config dir
|
||||
lock (_configSyncLock)
|
||||
lock (_policySyncLock)
|
||||
{
|
||||
try
|
||||
lock (_policySyncLock)
|
||||
{
|
||||
Directory.Delete(user.ConfigurationDirectoryPath, true);
|
||||
try
|
||||
{
|
||||
Directory.Delete(user.ConfigurationDirectoryPath, true);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error deleting user config dir: {Path}", user.ConfigurationDirectoryPath);
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error deleting user config dir: {Path}", user.ConfigurationDirectoryPath);
|
||||
}
|
||||
}
|
||||
|
||||
_users.TryRemove(user.Id, out _);
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
@@ -8,8 +8,8 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
|
||||
@@ -500,7 +500,7 @@ namespace Emby.Server.Implementations.Networking
|
||||
{
|
||||
if (ip.Address.Equals(address) && ip.IPv4Mask != null)
|
||||
{
|
||||
return ip.IPv4Mask;
|
||||
return ip.IPv4Mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
{
|
||||
yield return new TaskTriggerInfo
|
||||
{
|
||||
Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(12).Ticks
|
||||
Type = TaskTriggerInfo.TriggerInterval,
|
||||
IntervalTicks = TimeSpan.FromHours(12).Ticks
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Emby.Server.Implementations.HttpServer;
|
||||
using MediaBrowser.Controller.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
using Emby.Server.Implementations.HttpServer;
|
||||
|
||||
namespace Emby.Server.Implementations.Services
|
||||
{
|
||||
@@ -241,7 +241,7 @@ namespace Emby.Server.Implementations.Services
|
||||
|
||||
responses = responses,
|
||||
|
||||
security = new [] { apiKeySecurity }
|
||||
security = new[] { apiKeySecurity }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user