diff options
Diffstat (limited to 'xbmc/pvr/channels/PVRChannelGroupsContainer.cpp')
-rw-r--r-- | xbmc/pvr/channels/PVRChannelGroupsContainer.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xbmc/pvr/channels/PVRChannelGroupsContainer.cpp b/xbmc/pvr/channels/PVRChannelGroupsContainer.cpp index 8cf93af1c7..cf1701afa3 100644 --- a/xbmc/pvr/channels/PVRChannelGroupsContainer.cpp +++ b/xbmc/pvr/channels/PVRChannelGroupsContainer.cpp @@ -110,17 +110,16 @@ std::shared_ptr<CPVRChannel> CPVRChannelGroupsContainer::GetChannelForEpgTag(con if (!epgTag) return {}; - const CPVRChannelGroups* groups = epgTag->IsRadio() ? m_groupsRadio : m_groupsTV; - return groups->GetGroupAll()->GetByUniqueID(epgTag->UniqueChannelID(), epgTag->ClientID()); + return Get(epgTag->IsRadio())->GetGroupAll()->GetByUniqueID(epgTag->UniqueChannelID(), epgTag->ClientID()); } std::shared_ptr<CPVRChannel> CPVRChannelGroupsContainer::GetByPath(const std::string& strPath) const { - const std::shared_ptr<CPVRChannel> channel = m_groupsTV->GetByPath(strPath); - if (channel) - return channel; + const CPVRChannelsPath path(strPath); + if (path.IsValid()) + return Get(path.IsRadio())->GetByPath(path); - return m_groupsRadio->GetByPath(strPath); + return {}; } CPVRChannelGroupPtr CPVRChannelGroupsContainer::GetSelectedGroup(bool bRadio) const |