(2012-10-26, 11:47)Skixbmc Wrote: (2012-10-26, 11:23)dushmaniac Wrote: it's a bug, but your fix isn't correct either. but thanks for pointing it out
I was loosing my icons for the radio channels each time I started xbmc
Well, now I have no icons at all
but I think that the problem can be resolved with the following solution:
First:
bool CPVRChannel::SetIconPath(const CStdString &strIconPath, bool bIsUserSetIcon /* = false */)
{
CSingleLock lock(m_critSection);
if (m_strIconPath != strIconPath && CFile::Exists(strIconPath))
{
/* update the path */
m_strIconPath.Format("%s", strIconPath);
SetChanged();
m_bChanged = true;
/* did the user change the icon? */
if (bIsUserSetIcon)
m_bIsUserSetIcon = !m_strIconPath.IsEmpty();
return true;
}
return false;
}
Why?
Because this function is called from CPVRChannelGroup::SearchAndSetChannelIcons which do a OR call on the different image types.
Second:
CPVRChannelGroup::SearchAndSetChannelIcons
/* skip if an icon is already set */
if (!groupMember.channel->IconPath().IsEmpty() && CFile::Exists(groupMember.channel->IconPath()))
continue;
This is an second control of the file exists.
There is also another problem with assigning the icons manually, the setting isUserSetIcon is not set and there is no check when loading the channels to obey this settings.
Reg.
Fred