diff options
author | ksooo <3226626+ksooo@users.noreply.github.com> | 2024-06-29 21:04:03 +0200 |
---|---|---|
committer | ksooo <3226626+ksooo@users.noreply.github.com> | 2024-06-30 14:00:19 +0200 |
commit | efc508d5d1d8927fde504345991f61b7bb3ee7b7 (patch) | |
tree | e94450a2e599a3d8a20aae6035a437c8490d876e | |
parent | d9fd7760e74713503fc16c6aece4def0bc2bae83 (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.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp index 440f33e57f..8339da75b7 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); |