aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-09-06 02:50:07 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-09-06 02:50:07 -0400
commitd6645c2909b501492f68587acf33fe667df3e369 (patch)
treeab20ea51283d59baafa58428e9cffaff6c43b2e0
parent67505e24bdccae33387e59358c01471dd9536d42 (diff)
update prompt
-rw-r--r--MediaBrowser.ServerApplication/Native/WindowsApp.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.ServerApplication/Native/WindowsApp.cs b/MediaBrowser.ServerApplication/Native/WindowsApp.cs
index f7b19162d..2af6400e2 100644
--- a/MediaBrowser.ServerApplication/Native/WindowsApp.cs
+++ b/MediaBrowser.ServerApplication/Native/WindowsApp.cs
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
+using System.Windows.Forms;
using CommonIO;
using MediaBrowser.Controller.Power;
using MediaBrowser.Model.System;
@@ -209,6 +210,11 @@ namespace MediaBrowser.ServerApplication.Native
LoopUtil.Run(appName);
}
+ private bool Confirm()
+ {
+ return MessageBox.Show("Emby has detected that Windows Firewall has been configured in a way that may prevent your other devices from accessing Emby Server. Click OK to remove this rule, or cancel to proceed anyway.", "Windows Firewall", MessageBoxButtons.OKCancel) == DialogResult.OK;
+ }
+
public bool PortsRequireAuthorization(string applicationPath)
{
var appNameSrch = Path.GetFileName(applicationPath);
@@ -237,12 +243,13 @@ namespace MediaBrowser.ServerApplication.Native
//_logger.Debug("Found windows firewall rule: " + data);
if (data.IndexOf("Block", StringComparison.OrdinalIgnoreCase) != -1)
{
- return true;
+ return Confirm();
}
//var parts = data.Split('\n');
//return parts.Length > 4;
+ //return Confirm();
return false;
}
catch (Exception ex)