void CPVRGUIInfo::UpdatePlayingTag(void) { CPVRChannelPtr currentChannel; CPVRRecording recording; if (g_PVRManager.GetCurrentChannel(currentChannel)) { CEpgInfoTag epgTag; bool bHasEpgTag = GetPlayingTag(epgTag); CPVRChannelPtr channel; if (bHasEpgTag) channel = epgTag.ChannelTag(); if (!bHasEpgTag || !epgTag.IsActive() || !channel || *channel != *currentChannel) { CEpgInfoTag newTag; { CSingleLock lock(m_critSection); ResetPlayingTag(); if (currentChannel->GetEPGNow(newTag)) { m_playingEpgTag = new CEpgInfoTag(newTag); m_iDuration = m_playingEpgTag->GetDuration() * 1000; } } g_PVRManager.UpdateCurrentFile(); } } else if (g_PVRClients->GetPlayingRecording(recording)) { ResetPlayingTag(); m_iDuration = recording.GetDuration() * 1000; } }