From eb7094c04e3e9a42b38c949cfcfc15c5a6e1a549 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Sun, 26 Jan 2020 15:21:57 +0100 Subject: [PATCH] [PVR] Fix CPVREpgTagsCache missing channel data. --- xbmc/pvr/epg/EpgTagsCache.cpp | 12 ++++++++++++ xbmc/pvr/epg/EpgTagsCache.h | 2 ++ xbmc/pvr/epg/EpgTagsContainer.cpp | 1 + 3 files changed, 15 insertions(+) diff --git a/xbmc/pvr/epg/EpgTagsCache.cpp b/xbmc/pvr/epg/EpgTagsCache.cpp index c82eed2f3a496..34f6287626430 100644 --- a/xbmc/pvr/epg/EpgTagsCache.cpp +++ b/xbmc/pvr/epg/EpgTagsCache.cpp @@ -22,6 +22,18 @@ namespace const CDateTimeSpan ONE_SECOND(0, 0, 0, 1); } +void CPVREpgTagsCache::SetChannelData(const std::shared_ptr& 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 CPVREpgTagsCache::GetLastEndedTag() { Refresh(true); diff --git a/xbmc/pvr/epg/EpgTagsCache.h b/xbmc/pvr/epg/EpgTagsCache.h index 2da6348735054..7e1fd000bb937 100644 --- a/xbmc/pvr/epg/EpgTagsCache.h +++ b/xbmc/pvr/epg/EpgTagsCache.h @@ -31,6 +31,8 @@ class CPVREpgTagsCache { } + void SetChannelData(const std::shared_ptr& data); + void Reset(); std::shared_ptr GetLastEndedTag(); diff --git a/xbmc/pvr/epg/EpgTagsContainer.cpp b/xbmc/pvr/epg/EpgTagsContainer.cpp index cf1fba6b844a6..f07bf87e3b15b 100644 --- a/xbmc/pvr/epg/EpgTagsContainer.cpp +++ b/xbmc/pvr/epg/EpgTagsContainer.cpp @@ -43,6 +43,7 @@ void CPVREpgTagsContainer::SetEpgID(int iEpgID) void CPVREpgTagsContainer::SetChannelData(const std::shared_ptr& data) { m_channelData = data; + m_tagsCache->SetChannelData(data); for (const auto& tag : m_changedTags) tag.second->SetChannelData(data); }