if (HasPVRRecordingInfoTag())
GetPVRRecordingInfoTag()->CopyClientInfo(GetVideoInfoTag());
SetOverlayImage(ICON_OVERLAY_UNWATCHED, GetVideoInfoTag()->m_playCount > 0);
+ SetInvalid();
}
if (item.HasMusicInfoTag())
+ {
*GetMusicInfoTag() = *item.GetMusicInfoTag();
+ SetInvalid();
+ }
if (item.HasPictureInfoTag())
+ {
*GetPictureInfoTag() = *item.GetPictureInfoTag();
-
+ SetInvalid();
+ }
if (replaceLabels && !item.GetLabel().empty())
SetLabel(item.GetLabel());
if (replaceLabels && !item.GetLabel2().empty())
ar >> value;
m_artFallbacks.insert(make_pair(key, value));
}
+ SetInvalid();
}
}
void CGUIListItem::Serialize(CVariant &value)
void CGUIListItem::SetProperty(const CStdString &strKey, const CVariant &value)
{
- m_mapProperties[strKey] = value;
+ PropertyMap::iterator iter = m_mapProperties.find(strKey);
+ if (iter == m_mapProperties.end())
+ {
+ m_mapProperties.insert(make_pair(strKey, value));
+ SetInvalid();
+ }
+ else if (iter->second != value)
+ {
+ iter->second = value;
+ SetInvalid();
+ }
}
CVariant CGUIListItem::GetProperty(const CStdString &strKey) const
{
PropertyMap::iterator iter = m_mapProperties.find(strKey);
if (iter != m_mapProperties.end())
+ {
m_mapProperties.erase(iter);
+ SetInvalid();
+ }
}
void CGUIListItem::ClearProperties()
{
- m_mapProperties.clear();
+ if (!m_mapProperties.empty())
+ {
+ m_mapProperties.clear();
+ SetInvalid();
+ }
}
void CGUIListItem::IncrementProperty(const CStdString &strKey, int nVal)