aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2024-09-16 11:20:36 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2024-09-17 08:36:13 +0200
commit11b6b242c7390dedad0dfad883ab8bc530846c1e (patch)
tree9e29d0be9af9eac685b28ca9bdcbbcdfce30f479
parent0d165bea7389e42857a1b87110ed661bb9fbf33b (diff)
[PVR] EPG search: Fix channel group matching.
-rw-r--r--xbmc/pvr/epg/EpgSearchFilter.cpp18
-rw-r--r--xbmc/pvr/epg/EpgSearchFilter.h3
2 files changed, 6 insertions, 15 deletions
diff --git a/xbmc/pvr/epg/EpgSearchFilter.cpp b/xbmc/pvr/epg/EpgSearchFilter.cpp
index 0af425fd2a..2425c0a1c5 100644
--- a/xbmc/pvr/epg/EpgSearchFilter.cpp
+++ b/xbmc/pvr/epg/EpgSearchFilter.cpp
@@ -52,8 +52,6 @@ void CPVREpgSearchFilter::Reset()
m_bIgnorePresentTimers = true;
m_bIgnorePresentRecordings = true;
- m_groupIdMatches.reset();
-
m_iDatabaseId = -1;
m_title.clear();
m_lastExecutedDateTime.SetValid(false);
@@ -192,7 +190,6 @@ void CPVREpgSearchFilter::SetChannelGroupID(int iChannelGroupID)
if (m_iChannelGroupID != iChannelGroupID)
{
m_iChannelGroupID = iChannelGroupID;
- m_groupIdMatches.reset();
m_bChanged = true;
}
}
@@ -372,17 +369,14 @@ bool CPVREpgSearchFilter::MatchChannelGroup(const std::shared_ptr<const CPVREpgI
{
if (m_iChannelGroupID != -1)
{
- if (!m_groupIdMatches.has_value())
+ const std::shared_ptr<const CPVRChannelGroupsContainer> groups{
+ CServiceBroker::GetPVRManager().ChannelGroups()};
+ if (groups)
{
- const std::shared_ptr<const CPVRChannelGroup> group = CServiceBroker::GetPVRManager()
- .ChannelGroups()
- ->Get(m_bIsRadio)
- ->GetById(m_iChannelGroupID);
- m_groupIdMatches =
- group && (group->GetByUniqueID({tag->ClientID(), tag->UniqueChannelID()}) != nullptr);
+ const std::shared_ptr<const CPVRChannelGroup> group{
+ groups->Get(m_bIsRadio)->GetById(m_iChannelGroupID)};
+ return group && (group->GetByUniqueID({tag->ClientID(), tag->UniqueChannelID()}) != nullptr);
}
-
- return *m_groupIdMatches;
}
return true;
diff --git a/xbmc/pvr/epg/EpgSearchFilter.h b/xbmc/pvr/epg/EpgSearchFilter.h
index cf937b426a..f6cca5cf0c 100644
--- a/xbmc/pvr/epg/EpgSearchFilter.h
+++ b/xbmc/pvr/epg/EpgSearchFilter.h
@@ -13,7 +13,6 @@
#include "pvr/epg/EpgSearchData.h"
#include <memory>
-#include <optional>
#include <string>
#include <vector>
@@ -166,8 +165,6 @@ namespace PVR
bool m_bIgnorePresentTimers; /*!< True to ignore currently present timers (future recordings), false if not */
bool m_bIgnorePresentRecordings; /*!< True to ignore currently active recordings, false if not */
- mutable std::optional<bool> m_groupIdMatches;
-
int m_iDatabaseId = -1;
std::string m_title;
std::string m_iconPath;