- Moderator
- #11
one of the place can be in WOL setting.How about MP Configurator?
but i think this setting can be used by TV and all other stuff.
so hard to place it, or keep in MP setting XML, but none in MP config. so need to be edited manually.
one of the place can be in WOL setting.How about MP Configurator?
Well, some years ago, when I proposed this kind of thing, answer was "we already have too many settings".How about MP Configurator?
--
WBR, ajs![]()
diff --git "a/mediaportal/Core/Util/UNCTools.cs" "b/mediaportal/Core/Util/UNCTools.cs"
index 65a6486745..fe1765d6af 100644
--- "a/mediaportal/Core/Util/UNCTools.cs"
+++ "b/mediaportal/Core/Util/UNCTools.cs"
@@ -30,6 +30,7 @@ namespace MediaPortal.Util
static extern bool InternetGetConnectedState(ref ConnectionStatusEnum flags, int dw);
static string HostDetectMethod = "Ping";
+ static int UNCTimeOut = 1500;
/// <summary>
/// enum to hold the possible connection states
@@ -52,6 +53,7 @@ namespace MediaPortal.Util
using (Profile.Settings xmlreader = new Profile.MPSettings())
{
HostDetectMethod = xmlreader.GetValueAsString("general", "HostDetectMethod", "Ping");
+ UNCTimeOut = xmlreader.GetValueAsInt("general", "UNCTimeOut", 1500);
}
}
@@ -469,6 +471,7 @@ namespace MediaPortal.Util
break;
case IPStatus.TimedOut:
Log.Debug("UNCTools: PingHost: Connection has timed out...");
+ Log.Debug("UNCTools: UNCTimeOut set to :", UNCTimeOut , "ms");
break;
default:
Log.Debug(string.Format("PingHost: Ping failed: {0}", pingReply.Status.ToString()));
@@ -519,7 +522,7 @@ namespace MediaPortal.Util
{
var t1 = Task.Factory.StartNew(_ => DnsReverseLookup(strHost_or_IP),
TaskCreationOptions.AttachedToParent)
+ .TimeoutAfter(UNCTimeOut)
.ContinueWith(antecedent =>
{
if (!(antecedent.IsCanceled || antecedent.IsFaulted))
it's why i'm not dev lol.And also, you create a static which should be avoided and this, for a private method...
it's why i'm not dev lol.And also, you create a static which should be avoided and this, for a private method...