aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2015-11-29 14:20:43 +0100
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2015-11-29 14:20:43 +0100
commit01d7be4434b22aa8c8ebe88658351aeb24058c3c (patch)
tree4fe436d758e370df1c760b64830ceaa9b03736a9
parentc1e538e8bd2936ded91cdb03ad8914412cae6773 (diff)
parenta93aca64020059d4980cd5987564941b91f5920e (diff)
Merge pull request #8452 from ksooo/fix-pvr-window-flicker
[PVR] Timer update: Fix handling of timers with 'start at any time'
-rw-r--r--xbmc/pvr/timers/PVRTimers.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp
index e7a745b330..aea42bc6eb 100644
--- a/xbmc/pvr/timers/PVRTimers.cpp
+++ b/xbmc/pvr/timers/PVRTimers.cpp
@@ -143,11 +143,11 @@ bool CPVRTimers::UpdateEntries(const CPVRTimers &timers)
UpdateEpgEvent(newTimer);
VecTimerInfoTag* addEntry = NULL;
- MapTags::iterator itr = m_tags.find(newTimer->StartAsUTC());
+ MapTags::iterator itr = m_tags.find(newTimer->m_bStartAnyTime ? CDateTime() : newTimer->StartAsUTC());
if (itr == m_tags.end())
{
addEntry = new VecTimerInfoTag;
- m_tags.insert(std::make_pair(newTimer->StartAsUTC(), addEntry));
+ m_tags.insert(std::make_pair(newTimer->m_bStartAnyTime ? CDateTime() : newTimer->StartAsUTC(), addEntry));
}
else
{
@@ -198,7 +198,8 @@ bool CPVRTimers::UpdateEntries(const CPVRTimers &timers)
bChanged = true;
bAddedOrDeleted = true;
}
- else if (timer->StartAsUTC() != it->first)
+ else if ((timer->m_bStartAnyTime && it->first != CDateTime()) ||
+ (!timer->m_bStartAnyTime && timer->StartAsUTC() != it->first))
{
/* timer start has changed */
CLog::Log(LOGDEBUG,"PVRTimers - %s - changed start time timer %d on client %d",
@@ -230,11 +231,11 @@ bool CPVRTimers::UpdateEntries(const CPVRTimers &timers)
for (VecTimerInfoTag::const_iterator timerIt = timersToMove.begin(); timerIt != timersToMove.end(); ++timerIt)
{
VecTimerInfoTag* addEntry = NULL;
- MapTags::const_iterator itr = m_tags.find((*timerIt)->StartAsUTC());
+ MapTags::const_iterator itr = m_tags.find((*timerIt)->m_bStartAnyTime ? CDateTime() : (*timerIt)->StartAsUTC());
if (itr == m_tags.end())
{
addEntry = new VecTimerInfoTag;
- m_tags.insert(std::make_pair((*timerIt)->StartAsUTC(), addEntry));
+ m_tags.insert(std::make_pair((*timerIt)->m_bStartAnyTime ? CDateTime() : (*timerIt)->StartAsUTC(), addEntry));
}
else
{
@@ -277,11 +278,11 @@ bool CPVRTimers::UpdateFromClient(const CPVRTimerInfoTagPtr &timer)
{
tag = CPVRTimerInfoTagPtr(new CPVRTimerInfoTag());
VecTimerInfoTag* addEntry = NULL;
- MapTags::iterator itr = m_tags.find(timer->StartAsUTC());
+ MapTags::iterator itr = m_tags.find(timer->m_bStartAnyTime ? CDateTime() : timer->StartAsUTC());
if (itr == m_tags.end())
{
addEntry = new VecTimerInfoTag;
- m_tags.insert(std::make_pair(timer->StartAsUTC(), addEntry));
+ m_tags.insert(std::make_pair(timer->m_bStartAnyTime ? CDateTime() : timer->StartAsUTC(), addEntry));
}
else
{