Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PVR] Fix CPVREpgTagsCache missing channel data. #17271

Merged
merged 1 commit into from Jan 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions xbmc/pvr/epg/EpgTagsCache.cpp
Expand Up @@ -22,6 +22,18 @@ namespace
const CDateTimeSpan ONE_SECOND(0, 0, 0, 1);
}

void CPVREpgTagsCache::SetChannelData(const std::shared_ptr<CPVREpgChannelData>& data)
{
m_channelData = data;

if (m_lastEndedTag)
m_lastEndedTag->SetChannelData(data);
if (m_nowActiveTag)
m_nowActiveTag->SetChannelData(data);
if (m_nextStartingTag)
m_nextStartingTag->SetChannelData(data);
}

std::shared_ptr<CPVREpgInfoTag> CPVREpgTagsCache::GetLastEndedTag()
{
Refresh(true);
Expand Down
2 changes: 2 additions & 0 deletions xbmc/pvr/epg/EpgTagsCache.h
Expand Up @@ -31,6 +31,8 @@ class CPVREpgTagsCache
{
}

void SetChannelData(const std::shared_ptr<CPVREpgChannelData>& data);

void Reset();

std::shared_ptr<CPVREpgInfoTag> GetLastEndedTag();
Expand Down
1 change: 1 addition & 0 deletions xbmc/pvr/epg/EpgTagsContainer.cpp
Expand Up @@ -43,6 +43,7 @@ void CPVREpgTagsContainer::SetEpgID(int iEpgID)
void CPVREpgTagsContainer::SetChannelData(const std::shared_ptr<CPVREpgChannelData>& data)
{
m_channelData = data;
m_tagsCache->SetChannelData(data);
for (const auto& tag : m_changedTags)
tag.second->SetChannelData(data);
}
Expand Down