2009-11-28, 21:09
I've fixed the issue for me by adding the following method to Network.cpp:
And in Util.cpp in IsOnLAN() I changed the last check of the address to:
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.
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.