aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-06-29 21:04:03 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-07-10 09:01:37 +0200
commit50dde2a959d5ced1569a26abf4bb956512c1cc1e (patch)
tree824a706361ac3919f13bafa259ef6f6b7231b7e2
parent4b20052e59dff894ca111c0027aab5c809b7618c (diff)
[PVR] Fix CPVRTimers::UpdateEntries: Re-insert timers with changed start time before checking whether new children for local timer rules need to be created. The timers with changed start time need to be found during that check. This fixes creation of duplicate timers.
-rw-r--r--xbmc/pvr/timers/PVRTimers.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp
index 9c848239dc..a2b9e91c70 100644
--- a/xbmc/pvr/timers/PVRTimers.cpp
+++ b/xbmc/pvr/timers/PVRTimers.cpp
@@ -668,6 +668,13 @@ bool CPVRTimers::UpdateEntries(int iMaxNotificationDelay)
++it;
}
+ // reinsert timers with changed timer start
+ for (const auto& timer : timersToReinsert)
+ {
+ InsertEntry(timer);
+ timer->Persist();
+ }
+
// create new children of local epg-based reminder timer rules
for (const auto& epgMapEntry : epgMap)
{
@@ -694,14 +701,7 @@ bool CPVRTimers::UpdateEntries(int iMaxNotificationDelay)
}
}
- // reinsert timers with changed timer start
- for (const auto& timer : timersToReinsert)
- {
- InsertEntry(timer);
- timer->Persist();
- }
-
- // insert new children of time-based local timer rules
+ // persist and insert/update new children of local time-based and epg-based reminder timer rules
for (const auto& timerPair : childTimersToInsert)
{
PersistAndUpdateLocalTimer(timerPair.second, timerPair.first);