mirror of https://github.com/jellyfin/jellyfin.git
remove unused service properties
This commit is contained in:
parent
b335ae8ef1
commit
f7f41e4c73
|
@ -439,14 +439,6 @@ namespace Emby.Server.Implementations
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool SupportsRunningAsService
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private DeviceId _deviceId;
|
private DeviceId _deviceId;
|
||||||
public string SystemId
|
public string SystemId
|
||||||
{
|
{
|
||||||
|
@ -473,14 +465,6 @@ namespace Emby.Server.Implementations
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool IsRunningAsService
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Assembly GetAssembly(Type type)
|
private Assembly GetAssembly(Type type)
|
||||||
{
|
{
|
||||||
return type.GetTypeInfo().Assembly;
|
return type.GetTypeInfo().Assembly;
|
||||||
|
@ -1910,7 +1894,6 @@ namespace Emby.Server.Implementations
|
||||||
HasUpdateAvailable = HasUpdateAvailable,
|
HasUpdateAvailable = HasUpdateAvailable,
|
||||||
SupportsAutoRunAtStartup = SupportsAutoRunAtStartup,
|
SupportsAutoRunAtStartup = SupportsAutoRunAtStartup,
|
||||||
TranscodingTempPath = ApplicationPaths.TranscodingTempPath,
|
TranscodingTempPath = ApplicationPaths.TranscodingTempPath,
|
||||||
SupportsRunningAsService = SupportsRunningAsService,
|
|
||||||
ServerName = FriendlyName,
|
ServerName = FriendlyName,
|
||||||
LocalAddress = localAddress,
|
LocalAddress = localAddress,
|
||||||
SupportsLibraryMonitor = true,
|
SupportsLibraryMonitor = true,
|
||||||
|
|
|
@ -23,18 +23,9 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
_systemEvents.SessionLogoff += _systemEvents_SessionLogoff;
|
|
||||||
_systemEvents.SystemShutdown += _systemEvents_SystemShutdown;
|
_systemEvents.SystemShutdown += _systemEvents_SystemShutdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _systemEvents_SessionLogoff(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (!_appHost.IsRunningAsService)
|
|
||||||
{
|
|
||||||
_appHost.Shutdown();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _systemEvents_SystemShutdown(object sender, EventArgs e)
|
private void _systemEvents_SystemShutdown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_appHost.Shutdown();
|
_appHost.Shutdown();
|
||||||
|
|
|
@ -67,13 +67,10 @@ namespace MediaBrowser.Api
|
||||||
_config.SaveConfiguration();
|
_config.SaveConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<object> Get(GetStartupInfo request)
|
public object Get(GetStartupInfo request)
|
||||||
{
|
{
|
||||||
var info = await _appHost.GetSystemInfo().ConfigureAwait(false);
|
|
||||||
|
|
||||||
return new StartupInfo
|
return new StartupInfo
|
||||||
{
|
{
|
||||||
SupportsRunningAsService = info.SupportsRunningAsService,
|
|
||||||
HasMediaEncoder = !string.IsNullOrWhiteSpace(_mediaEncoder.EncoderPath)
|
HasMediaEncoder = !string.IsNullOrWhiteSpace(_mediaEncoder.EncoderPath)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -152,7 +149,6 @@ namespace MediaBrowser.Api
|
||||||
|
|
||||||
public class StartupInfo
|
public class StartupInfo
|
||||||
{
|
{
|
||||||
public bool SupportsRunningAsService { get; set; }
|
|
||||||
public bool HasMediaEncoder { get; set; }
|
public bool HasMediaEncoder { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,6 @@ namespace MediaBrowser.Controller
|
||||||
/// <returns>SystemInfo.</returns>
|
/// <returns>SystemInfo.</returns>
|
||||||
Task<SystemInfo> GetSystemInfo();
|
Task<SystemInfo> GetSystemInfo();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance is running as service.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance is running as service; otherwise, <c>false</c>.</value>
|
|
||||||
bool IsRunningAsService { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether [supports automatic run at startup].
|
/// Gets a value indicating whether [supports automatic run at startup].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -16,12 +16,6 @@ namespace MediaBrowser.Model.System
|
||||||
/// <value>The display name of the operating system.</value>
|
/// <value>The display name of the operating system.</value>
|
||||||
public string OperatingSystemDisplayName { get; set; }
|
public string OperatingSystemDisplayName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether [supports running as service].
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if [supports running as service]; otherwise, <c>false</c>.</value>
|
|
||||||
public bool SupportsRunningAsService { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the mac address.
|
/// Gets or sets the mac address.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -31,11 +31,6 @@ namespace MediaBrowser.ServerApplication
|
||||||
fileSystem.AddShortcutHandler(new LnkShortcutHandler());
|
fileSystem.AddShortcutHandler(new LnkShortcutHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsRunningAsService
|
|
||||||
{
|
|
||||||
get { return MainStartup.IsRunningAsService; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override IConnectManager CreateConnectManager()
|
protected override IConnectManager CreateConnectManager()
|
||||||
{
|
{
|
||||||
return new ConnectManager();
|
return new ConnectManager();
|
||||||
|
@ -111,14 +106,6 @@ namespace MediaBrowser.ServerApplication
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool SupportsRunningAsService
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CanSelfRestart
|
public override bool CanSelfRestart
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Reference in New Issue