aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-06-29 17:55:55 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-06-30 14:00:18 +0200
commitd9fd7760e74713503fc16c6aece4def0bc2bae83 (patch)
tree03b4487dab06af1fda1cf37ac7fa0686c16513ca
parentab1cf0cf792083fcceff7788a58a6773fe67578b (diff)
[PVR] Fix CPVRTimers::UpdateEntries: Delete existing epg-based local timers if the respective EPG tag was re-used for an unrelated event that no longer matches the related timer rule.
-rw-r--r--xbmc/pvr/timers/PVRTimers.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp
index 91dd76481c..440f33e57f 100644
--- a/xbmc/pvr/timers/PVRTimers.cpp
+++ b/xbmc/pvr/timers/PVRTimers.cpp
@@ -550,6 +550,23 @@ bool CPVRTimers::UpdateEntries(int iMaxNotificationDelay)
timer->Persist();
}
}
+
+ // check for epg tag uids that were re-used for a different event (which is actually
+ // an add-on/a backend bug)
+ if (!timer->IsTimerRule() && (epgTag->Title() != timer->Title()))
+ {
+ const std::shared_ptr<CPVRTimerInfoTag> parent{GetTimerRule(timer)};
+ if (parent)
+ {
+ const CPVRTimerRuleMatcher matcher{parent, now};
+ if (!matcher.Matches(epgTag))
+ {
+ // epg event no longer matches the rule. delete the timer
+ bDeleteTimer = true;
+ timer->DeleteFromDatabase();
+ }
+ }
+ }
}
else if (!timer->IsTimerRule())
{