9.11Beta1: No auto thumbnails generated
#16
I've fixed the issue for me by adding the following method to Network.cpp:

Code:
bool CNetwork::HasInterfaceForIP(unsigned long address)
{
   unsigned long subnet;
   unsigned long local;
   vector<CNetworkInterface*>& ifaces = GetInterfaceList();
   vector<CNetworkInterface*>::const_iterator iter = ifaces.begin();
   while (iter != ifaces.end())
   {
      CNetworkInterface* iface = *iter;
      if (iface && iface->IsConnected())
      {
         subnet = ntohl(inet_addr(iface->GetCurrentNetmask()));
         local = ntohl(inet_addr(iface->GetCurrentIPAddress()));
         if( (address & subnet) == (local & subnet) )
            return true;
      }
      ++iter;
   }

   return false;
}

And in Util.cpp in IsOnLAN() I changed the last check of the address to:
Code:
// check if we are on the local subnet
   if (!g_application.getNetwork().GetFirstConnectedInterface())
      return false;
   if (g_application.getNetwork().HasInterfaceForIP(address))
      return true;

Then the thumbnails will successfully show up in files mode. The other issue in library mode that occurs since the thumbnail method is called with the videodb:// url still remains.
Reply
#17
Best would be when you would open two tickets for the reported issues and post a diff there. But I would like to keep the changes in NetworkWin32 rather than expand it for every port. Additional I think it would be better to fix IsConnected() rather than introducing a work around.
What do you think?

Edit:
The more I think about this the more your solution sounds plausible for me. Anyway please open a ticket I'll would like to discuss it with the other devs.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#18
WiSo Wrote:Best would be when you would open two tickets for the reported issues and post a diff there. But I would like to keep the changes in NetworkWin32 rather than expand it for every port. Additional I think it would be better to fix IsConnected() rather than introducing a work around.
What do you think?

Edit:
The more I think about this the more your solution sounds plausible for me. Anyway please open a ticket I'll would like to discuss it with the other devs.

Yeah, I first thought about adding it into IsOnLAN() using GetInterfaceList() and then doing the iteration there. But when I saw GetFirstConnectedInterface() which is very similar I decided to move the function to Network.cpp.

I've opened a ticket with the patch for the interfaces issue and another one for the thumbnail issue in library mode.
Reply
#19
Good to see svn 25307 and later correct this...
Reply

Logout Mark Read Team Forum Stats Members Help
9.11Beta1: No auto thumbnails generated0