rename some missed variables and fix warnings
This commit is contained in:
parent
f3ca37e523
commit
b1f9b03b17
|
@ -456,7 +456,7 @@ namespace Emby.Server.Implementations
|
||||||
public string Name => ApplicationProductName;
|
public string Name => ApplicationProductName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an instance of type and resolves all constructor dependencies
|
/// Creates an instance of type and resolves all constructor dependencies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">The type.</param>
|
/// <param name="type">The type.</param>
|
||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
|
@ -464,7 +464,7 @@ namespace Emby.Server.Implementations
|
||||||
=> ActivatorUtilities.CreateInstance(_serviceProvider, type);
|
=> ActivatorUtilities.CreateInstance(_serviceProvider, type);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an instance of type and resolves all constructor dependencies
|
/// Creates an instance of type and resolves all constructor dependencies.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// /// <typeparam name="T">The type.</typeparam>
|
/// /// <typeparam name="T">The type.</typeparam>
|
||||||
/// <returns>T.</returns>
|
/// <returns>T.</returns>
|
||||||
|
@ -512,11 +512,12 @@ namespace Emby.Server.Implementations
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IReadOnlyCollection<T> GetExports<T>(bool manageLifetime = true)
|
public IReadOnlyCollection<T> GetExports<T>(bool manageLifetime = true)
|
||||||
{
|
{
|
||||||
|
// Convert to list so this isn't executed for each iteration
|
||||||
var parts = GetExportTypes<T>()
|
var parts = GetExportTypes<T>()
|
||||||
.Select(CreateInstanceSafe)
|
.Select(CreateInstanceSafe)
|
||||||
.Where(i => i != null)
|
.Where(i => i != null)
|
||||||
.Cast<T>()
|
.Cast<T>()
|
||||||
.ToList(); // Convert to list so this isn't executed for each iteration
|
.ToList();
|
||||||
|
|
||||||
if (manageLifetime)
|
if (manageLifetime)
|
||||||
{
|
{
|
||||||
|
@ -1418,7 +1419,7 @@ namespace Emby.Server.Implementations
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the system status.
|
/// Gets the system status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cancellationToken">The cancellation token</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
/// <returns>SystemInfo.</returns>
|
/// <returns>SystemInfo.</returns>
|
||||||
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
|
public async Task<SystemInfo> GetSystemInfo(CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
|
@ -1446,7 +1447,7 @@ namespace Emby.Server.Implementations
|
||||||
CanSelfRestart = CanSelfRestart,
|
CanSelfRestart = CanSelfRestart,
|
||||||
CanLaunchWebBrowser = CanLaunchWebBrowser,
|
CanLaunchWebBrowser = CanLaunchWebBrowser,
|
||||||
HasUpdateAvailable = HasUpdateAvailable,
|
HasUpdateAvailable = HasUpdateAvailable,
|
||||||
TranscodingTempPath = ApplicationPaths.TranscodePath,
|
TranscodePath = ApplicationPaths.TranscodePath,
|
||||||
ServerName = FriendlyName,
|
ServerName = FriendlyName,
|
||||||
LocalAddress = localAddress,
|
LocalAddress = localAddress,
|
||||||
SupportsLibraryMonitor = true,
|
SupportsLibraryMonitor = true,
|
||||||
|
@ -1847,6 +1848,7 @@ namespace Emby.Server.Implementations
|
||||||
internal class CertificateInfo
|
internal class CertificateInfo
|
||||||
{
|
{
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,9 +91,9 @@ namespace Emby.Server.Implementations.Configuration
|
||||||
{
|
{
|
||||||
var encodingConfig = this.GetConfiguration<EncodingOptions>("encoding");
|
var encodingConfig = this.GetConfiguration<EncodingOptions>("encoding");
|
||||||
|
|
||||||
((ServerApplicationPaths)ApplicationPaths).TranscodePath = string.IsNullOrEmpty(encodingConfig.TranscodingTempPath) ?
|
((ServerApplicationPaths)ApplicationPaths).TranscodePath = string.IsNullOrEmpty(encodingConfig.TranscodePath) ?
|
||||||
null :
|
null :
|
||||||
Path.Combine(encodingConfig.TranscodingTempPath, "transcodes");
|
Path.Combine(encodingConfig.TranscodePath, "transcodes");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNamedConfigurationUpdated(string key, object configuration)
|
protected override void OnNamedConfigurationUpdated(string key, object configuration)
|
||||||
|
|
|
@ -39,13 +39,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
/// Creates the triggers that define when the task will run
|
/// Creates the triggers that define when the task will run
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
||||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers() => new List<TaskTriggerInfo>();
|
||||||
{
|
|
||||||
yield return new TaskTriggerInfo
|
|
||||||
{
|
|
||||||
Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the task to be executed
|
/// Returns the task to be executed
|
||||||
|
@ -154,7 +148,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
|
||||||
|
|
||||||
public bool IsHidden => false;
|
public bool IsHidden => false;
|
||||||
|
|
||||||
public bool IsEnabled => true;
|
public bool IsEnabled => false;
|
||||||
|
|
||||||
public bool IsLogged => true;
|
public bool IsLogged => true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Emby.Server.Implementations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths
|
public class ServerApplicationPaths : BaseApplicationPaths, IServerApplicationPaths
|
||||||
{
|
{
|
||||||
private string _defaultTranscodingTempPath;
|
private string _defaultTranscodePath;
|
||||||
private string _transcodePath;
|
private string _transcodePath;
|
||||||
private string _internalMetadataPath;
|
private string _internalMetadataPath;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ namespace Emby.Server.Implementations
|
||||||
/// <value>The user configuration directory path.</value>
|
/// <value>The user configuration directory path.</value>
|
||||||
public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users");
|
public string UserConfigurationDirectoryPath => Path.Combine(ConfigurationDirectoryPath, "users");
|
||||||
|
|
||||||
public string DefaultTranscodePath => _defaultTranscodingTempPath ?? (_defaultTranscodingTempPath = Path.Combine(ProgramDataPath, "transcodes"));
|
public string DefaultTranscodePath => _defaultTranscodePath ?? (_defaultTranscodePath = Path.Combine(ProgramDataPath, "transcodes"));
|
||||||
|
|
||||||
public string TranscodePath
|
public string TranscodePath
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,10 +40,10 @@ namespace MediaBrowser.MediaEncoding.Configuration
|
||||||
var oldEncodingConfig = (EncodingOptions)oldConfig;
|
var oldEncodingConfig = (EncodingOptions)oldConfig;
|
||||||
var newEncodingConfig = (EncodingOptions)newConfig;
|
var newEncodingConfig = (EncodingOptions)newConfig;
|
||||||
|
|
||||||
var newPath = newEncodingConfig.TranscodingTempPath;
|
var newPath = newEncodingConfig.TranscodePath;
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(newPath)
|
if (!string.IsNullOrWhiteSpace(newPath)
|
||||||
&& !string.Equals(oldEncodingConfig.TranscodingTempPath ?? string.Empty, newPath))
|
&& !string.Equals(oldEncodingConfig.TranscodePath ?? string.Empty, newPath))
|
||||||
{
|
{
|
||||||
// Validate
|
// Validate
|
||||||
if (!Directory.Exists(newPath))
|
if (!Directory.Exists(newPath))
|
||||||
|
|
|
@ -3,7 +3,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
public class EncodingOptions
|
public class EncodingOptions
|
||||||
{
|
{
|
||||||
public int EncodingThreadCount { get; set; }
|
public int EncodingThreadCount { get; set; }
|
||||||
public string TranscodingTempPath { get; set; }
|
public string TranscodePath { get; set; }
|
||||||
public double DownMixAudioBoost { get; set; }
|
public double DownMixAudioBoost { get; set; }
|
||||||
public bool EnableThrottling { get; set; }
|
public bool EnableThrottling { get; set; }
|
||||||
public int ThrottleDelaySeconds { get; set; }
|
public int ThrottleDelaySeconds { get; set; }
|
||||||
|
|
|
@ -113,7 +113,7 @@ namespace MediaBrowser.Model.System
|
||||||
/// Gets or sets the transcoding temporary path.
|
/// Gets or sets the transcoding temporary path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The transcoding temporary path.</value>
|
/// <value>The transcoding temporary path.</value>
|
||||||
public string TranscodingTempPath { get; set; }
|
public string TranscodePath { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the HTTP server port number.
|
/// Gets or sets the HTTP server port number.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user