1.22.0 Problem with Synology NAS ? (1 Viewer)

azzuro

Test Group
  • Team MediaPortal
  • May 10, 2007
    9,869
    5,525
    France - IDF
    France France
    Country flag
    How about MP Configurator?
    one of the place can be in WOL setting.
    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.
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    4,674
    657
    South of France
    France France
    Country flag
    • Thread starter
    • Moderator
    • #12
    How about MP Configurator?

    --
    WBR, ajs :):whistle::coffee:
    Well, some years ago, when I proposed this kind of thing, answer was "we already have too many settings".
    And also, remember that it is a timeout timer.
    If NAS answer before, we don't have to wait until 1.5 second, if I understand correctly.
    So, are you sure it is worth to ?
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,869
    5,525
    France - IDF
    France France
    Country flag
    guy's
    i do an sample of code : i hope it work, no need to set setting in MP configuration, only adding value in setting file if needed.
    Code:
    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))
     

    Attachments

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    4,674
    657
    South of France
    France France
    Country flag
    • Thread starter
    • Moderator
    • #14
    :confused: But why create a gaz factory just for an int, a timeout timer ?
    xmlreader use I/O and then, take time and ressources.
    We have no other asyncDNS in MP client code than here.
    And also, you create a static which should be avoided and this, for a private method...
     
    Last edited:

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,869
    5,525
    France - IDF
    France France
    Country flag
    And also, you create a static which should be avoided and this, for a private method...
    it's why i'm not dev lol.
    i try my sample and seems work. setting can be edited easily, but maybe(and sure) not needed
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,869
    5,525
    France - IDF
    France France
    Country flag
    And also, you create a static which should be avoided and this, for a private method...
    it's why i'm not dev lol.
    i try my sample and seems work. setting can be edited easily, but maybe(and sure) not needed
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    13,527
    8,035
    Kyiv
    Ukraine Ukraine
    Country flag
    May be move timeout read part to MP start procedure? On start MP read timeout value and use it ... ?

    --
    WBR, ajs :):whistle::coffee:
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    13,527
    8,035
    Kyiv
    Ukraine Ukraine
    Country flag
    Add new method in UNCTools.cs like ReadAndCacheTimeout and call it when MP start...

    --
    WBR, ajs :):whistle::coffee:
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    4,674
    657
    South of France
    France France
    Country flag
    • Thread starter
    • Moderator
    • #19
    Again :
    Who need to change this timeout value ?
     

    Users who are viewing this thread

    Similar threads
    OP Title Forum Replies Date
    M NAS is not recognized in MP (Edit: Solved -> SMB Problem in WIN10) MediaPortal 1 Talk 28
    M Digital Device Driver Problem TV-Cards 1
    D Problem getting Schedules Direct EPG to load data Installation, configuration support 4
    nominefi tuning problem TV-Server 0
    igormaiden 1.27.0 Problem with delay of Lav Filters Audio 1.24-1.27 Pre Release 12
    R Problem with external subtitles (srt) watch/edit Videos 2
    S Problem with connecting to the TV server from outside Installation, configuration support 0
    G 1.27.0 Problem with One Button Music after upgrade to MP 1.27.0 pre General Support 15
    peque Help with a tv viewing problem TV-Server 2
    M MP2 - V2.3 MP2 & USB Problems Submit: Bug Reports 43
    T Upgrade 1.26 Problem Installation, configuration support 4
    C 1.26.0 Problem beim Senderwechsel Allgemeines Supportforum 1
    JimCatMP Problems with TV Server on dual homed host. General Support 0
    M [solved] MP2 PROBLEME Standby Allgemeines Support- und Diskussionsforum 2
    404 Recording problems Television (MyTV frontend and TV-Server) 6
    F Problems with new install of MP2 Newcomers Forum 3
    A [solved] DiseqC problems after upgrade to 1.25 General Support 16
    M Problems with VFD Display after standby- Futaba DM140GINK Mini Display 0
    R Connection (api) problems with thetvdb.com General 3
    123vak123 [solved] 5008: The problem with scrolling text in the "listcontrol" in 4K General Support 22
    framug 1.24.0 1.25.0 pre : problem with build ? 1.24-1.27 Pre Release 89
    J Problems with 1.24 StreamedMP 19
    Rob Hexenmeister Navigation problems adding menu buttons to EPG General Support 1
    404 [solved] EPG problem after Win10 'upgrade' General Support 1
    framug [EPG] Some problems with DVB EPG Improvement Suggestions 49

    Similar threads

    Top Bottom