diff options
Diffstat (limited to 'MediaBrowser.ServerApplication/WindowsAppHost.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/WindowsAppHost.cs | 106 |
1 files changed, 1 insertions, 105 deletions
diff --git a/MediaBrowser.ServerApplication/WindowsAppHost.cs b/MediaBrowser.ServerApplication/WindowsAppHost.cs index ec66923aa..9d19525b4 100644 --- a/MediaBrowser.ServerApplication/WindowsAppHost.cs +++ b/MediaBrowser.ServerApplication/WindowsAppHost.cs @@ -27,38 +27,6 @@ namespace MediaBrowser.ServerApplication get { return MainStartup.IsRunningAsService; } } - protected override FFMpegInstallInfo GetFfmpegInstallInfo() - { - var info = new FFMpegInstallInfo(); - - info.FFMpegFilename = "ffmpeg.exe"; - info.FFProbeFilename = "ffprobe.exe"; - info.Version = "20160410"; - info.ArchiveType = "7z"; - info.DownloadUrls = GetDownloadUrls(); - - return info; - } - - private string[] GetDownloadUrls() - { - switch (EnvironmentInfo.SystemArchitecture) - { - case Architecture.X64: - return new[] - { - "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win64.7z" - }; - case Architecture.X86: - return new[] - { - "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win32.7z" - }; - } - - return new string[] { }; - } - protected override void RestartInternal() { MainStartup.Restart(); @@ -94,7 +62,7 @@ namespace MediaBrowser.ServerApplication protected override void ConfigureAutoRunInternal(bool autorun) { - var startupPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Startup); + var startupPath = Environment.GetFolderPath(System.Environment.SpecialFolder.Startup); if (autorun && !MainStartup.IsRunningAsService) { @@ -121,14 +89,6 @@ namespace MediaBrowser.ServerApplication } } - protected override bool SupportsDualModeSockets - { - get - { - return true; - } - } - protected override void EnableLoopbackInternal(string appName) { LoopUtil.Run(appName); @@ -150,14 +110,6 @@ namespace MediaBrowser.ServerApplication } } - public override bool SupportsAutoRunAtStartup - { - get - { - return true; - } - } - public override bool CanSelfUpdate { get @@ -165,61 +117,5 @@ namespace MediaBrowser.ServerApplication return MainStartup.CanSelfUpdate; } } - - public bool PortsRequireAuthorization(string applicationPath) - { - var appNameSrch = Path.GetFileName(applicationPath); - - var startInfo = new ProcessStartInfo - { - FileName = "netsh", - - Arguments = "advfirewall firewall show rule \"" + appNameSrch + "\"", - - CreateNoWindow = true, - UseShellExecute = false, - WindowStyle = ProcessWindowStyle.Hidden, - ErrorDialog = false, - RedirectStandardOutput = true - }; - - using (var process = Process.Start(startInfo)) - { - process.Start(); - - try - { - var data = process.StandardOutput.ReadToEnd() ?? string.Empty; - - if (data.IndexOf("Block", StringComparison.OrdinalIgnoreCase) != -1) - { - Logger.Info("Found potential windows firewall rule blocking Emby Server: " + data); - } - - //var parts = data.Split('\n'); - - //return parts.Length > 4; - //return Confirm(); - return false; - } - catch (Exception ex) - { - Logger.ErrorException("Error querying windows firewall", ex); - - // Hate having to do this - try - { - process.Kill(); - } - catch (Exception ex1) - { - Logger.ErrorException("Error killing process", ex1); - } - - throw; - } - } - } - } } |
