diff options
author | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2022-03-30 19:44:30 +0200 |
---|---|---|
committer | Kai Sommerfeld <kai.sommerfeld@gmx.com> | 2022-04-07 07:59:55 +0200 |
commit | 525abc9991725ab68b0c40621f5b7ab537a61c0f (patch) | |
tree | 28cf55b92163e2c59b8a13cc2297e8129498278e | |
parent | c5fc05cdff63c08ec06578bb1036f9c1bad4f6bf (diff) |
[PVR] CPVRChannelGroup, CPVREpg, CPVREpgContainer, CPVREpgTagsContainer: Remove dead code.
-rw-r--r-- | xbmc/pvr/channels/PVRChannelGroup.cpp | 43 | ||||
-rw-r--r-- | xbmc/pvr/channels/PVRChannelGroup.h | 20 | ||||
-rw-r--r-- | xbmc/pvr/epg/Epg.cpp | 12 | ||||
-rw-r--r-- | xbmc/pvr/epg/Epg.h | 12 | ||||
-rw-r--r-- | xbmc/pvr/epg/EpgContainer.cpp | 36 | ||||
-rw-r--r-- | xbmc/pvr/epg/EpgContainer.h | 12 | ||||
-rw-r--r-- | xbmc/pvr/epg/EpgTagsContainer.cpp | 34 | ||||
-rw-r--r-- | xbmc/pvr/epg/EpgTagsContainer.h | 12 |
8 files changed, 0 insertions, 181 deletions
diff --git a/xbmc/pvr/channels/PVRChannelGroup.cpp b/xbmc/pvr/channels/PVRChannelGroup.cpp index dd7528c1c1..86df6ef1fb 100644 --- a/xbmc/pvr/channels/PVRChannelGroup.cpp +++ b/xbmc/pvr/channels/PVRChannelGroup.cpp @@ -961,49 +961,6 @@ void CPVRChannelGroup::OnSettingChanged() m_events.Publish(bRenumbered ? PVREvent::ChannelGroupInvalidated : PVREvent::ChannelGroup); } -CDateTime CPVRChannelGroup::GetEPGDate(EpgDateType epgDateType) const -{ - CDateTime date; - std::shared_ptr<CPVREpg> epg; - std::shared_ptr<CPVRChannel> channel; - std::unique_lock<CCriticalSection> lock(m_critSection); - - for (const auto& memberPair : m_members) - { - channel = memberPair.second->Channel(); - if (!channel->IsHidden() && (epg = channel->GetEPG())) - { - CDateTime epgDate; - switch (epgDateType) - { - case EPG_FIRST_DATE: - epgDate = epg->GetFirstDate(); - if (epgDate.IsValid() && (!date.IsValid() || epgDate < date)) - date = epgDate; - break; - - case EPG_LAST_DATE: - epgDate = epg->GetLastDate(); - if (epgDate.IsValid() && (!date.IsValid() || epgDate > date)) - date = epgDate; - break; - } - } - } - - return date; -} - -CDateTime CPVRChannelGroup::GetFirstEPGDate() const -{ - return GetEPGDate(EPG_FIRST_DATE); -} - -CDateTime CPVRChannelGroup::GetLastEPGDate() const -{ - return GetEPGDate(EPG_LAST_DATE); -} - int CPVRChannelGroup::GroupID() const { return m_iGroupId; diff --git a/xbmc/pvr/channels/PVRChannelGroup.h b/xbmc/pvr/channels/PVRChannelGroup.h index 831a09b403..d00adc999d 100644 --- a/xbmc/pvr/channels/PVRChannelGroup.h +++ b/xbmc/pvr/channels/PVRChannelGroup.h @@ -35,12 +35,6 @@ namespace PVR class CPVRClient; class CPVREpgInfoTag; - enum EpgDateType - { - EPG_FIRST_DATE = 0, - EPG_LAST_DATE = 1 - }; - enum RenumberMode { NORMAL = 0, @@ -368,18 +362,6 @@ namespace PVR virtual bool CreateChannelEpgs(bool bForce = false); /*! - * @brief Get the start time of the first entry. - * @return The start time. - */ - CDateTime GetFirstEPGDate() const; - - /*! - * @brief Get the end time of the last entry. - * @return The end time. - */ - CDateTime GetLastEPGDate() const; - - /*! * @brief Update a channel group member with given data. * @param storageId The storage id of the channel. * @param strChannelName The channel name to set. @@ -550,8 +532,6 @@ namespace PVR void OnSettingChanged(); - CDateTime GetEPGDate(EpgDateType epgDateType) const; - std::shared_ptr<CPVRChannelGroup> m_allChannelsGroup; CPVRChannelsPath m_path; bool m_bDeleted = false; diff --git a/xbmc/pvr/epg/Epg.cpp b/xbmc/pvr/epg/Epg.cpp index 79ef8860b2..1ebba9009a 100644 --- a/xbmc/pvr/epg/Epg.cpp +++ b/xbmc/pvr/epg/Epg.cpp @@ -377,18 +377,6 @@ bool CPVREpg::QueueDeleteQueries(const std::shared_ptr<CPVREpgDatabase>& databas return true; } -CDateTime CPVREpg::GetFirstDate() const -{ - std::unique_lock<CCriticalSection> lock(m_critSection); - return m_tags.GetFirstStartTime(); -} - -CDateTime CPVREpg::GetLastDate() const -{ - std::unique_lock<CCriticalSection> lock(m_critSection); - return m_tags.GetLastEndTime(); -} - std::pair<CDateTime, CDateTime> CPVREpg::GetFirstAndLastUncommitedEPGDate() const { std::unique_lock<CCriticalSection> lock(m_critSection); diff --git a/xbmc/pvr/epg/Epg.h b/xbmc/pvr/epg/Epg.h index 1e64f66534..31bc8d0888 100644 --- a/xbmc/pvr/epg/Epg.h +++ b/xbmc/pvr/epg/Epg.h @@ -225,18 +225,6 @@ namespace PVR bool QueueDeleteQueries(const std::shared_ptr<CPVREpgDatabase>& database); /*! - * @brief Get the start time of the first entry in this table. - * @return The first date in UTC. - */ - CDateTime GetFirstDate() const; - - /*! - * @brief Get the end time of the last entry in this table. - * @return The last date in UTC. - */ - CDateTime GetLastDate() const; - - /*! * @brief Get the start and end time of the last not yet commited entry in this table. * @return The times; first: start time, second: end time. */ diff --git a/xbmc/pvr/epg/EpgContainer.cpp b/xbmc/pvr/epg/EpgContainer.cpp index b9744b0148..8c05ce803d 100644 --- a/xbmc/pvr/epg/EpgContainer.cpp +++ b/xbmc/pvr/epg/EpgContainer.cpp @@ -810,42 +810,6 @@ bool CPVREpgContainer::UpdateEPG(bool bOnlyPending /* = false */) return !bInterrupted; } -const CDateTime CPVREpgContainer::GetFirstEPGDate() -{ - CDateTime returnValue; - - m_critSection.lock(); - const auto epgs = m_epgIdToEpgMap; - m_critSection.unlock(); - - for (const auto& epgEntry : epgs) - { - CDateTime entry = epgEntry.second->GetFirstDate(); - if (entry.IsValid() && (!returnValue.IsValid() || entry < returnValue)) - returnValue = entry; - } - - return returnValue; -} - -const CDateTime CPVREpgContainer::GetLastEPGDate() -{ - CDateTime returnValue; - - m_critSection.lock(); - const auto epgs = m_epgIdToEpgMap; - m_critSection.unlock(); - - for (const auto& epgEntry : epgs) - { - CDateTime entry = epgEntry.second->GetLastDate(); - if (entry.IsValid() && (!returnValue.IsValid() || entry > returnValue)) - returnValue = entry; - } - - return returnValue; -} - std::pair<CDateTime, CDateTime> CPVREpgContainer::GetFirstAndLastEPGDate() const { // Get values from db diff --git a/xbmc/pvr/epg/EpgContainer.h b/xbmc/pvr/epg/EpgContainer.h index a5b60b4125..127b38a3ce 100644 --- a/xbmc/pvr/epg/EpgContainer.h +++ b/xbmc/pvr/epg/EpgContainer.h @@ -111,18 +111,6 @@ namespace PVR std::shared_ptr<CPVREpg> CreateChannelEpg(int iEpgId, const std::string& strScraperName, const std::shared_ptr<CPVREpgChannelData>& channelData); /*! - * @brief Get the start time of the first entry. - * @return The start time. - */ - const CDateTime GetFirstEPGDate(); - - /*! - * @brief Get the end time of the last entry. - * @return The end time. - */ - const CDateTime GetLastEPGDate(); - - /*! * @brief Get the start and end time across all EPGs. * @return The times; first: start time, second: end time. */ diff --git a/xbmc/pvr/epg/EpgTagsContainer.cpp b/xbmc/pvr/epg/EpgTagsContainer.cpp index de0ce15e74..9ad73ff163 100644 --- a/xbmc/pvr/epg/EpgTagsContainer.cpp +++ b/xbmc/pvr/epg/EpgTagsContainer.cpp @@ -611,40 +611,6 @@ std::vector<std::shared_ptr<CPVREpgInfoTag>> CPVREpgTagsContainer::GetAllTags() return {}; } -CDateTime CPVREpgTagsContainer::GetFirstStartTime() const -{ - CDateTime result; - - if (!m_changedTags.empty()) - result = (*m_changedTags.cbegin()).second->StartAsUTC(); - - if (m_database) - { - const CDateTime dbResult = m_database->GetFirstStartTime(m_iEpgID); - if (!result.IsValid() || (dbResult.IsValid() && dbResult < result)) - result = dbResult; - } - - return result; -} - -CDateTime CPVREpgTagsContainer::GetLastEndTime() const -{ - CDateTime result; - - if (!m_changedTags.empty()) - result = (*m_changedTags.crbegin()).second->EndAsUTC(); - - if (m_database) - { - const CDateTime dbResult = m_database->GetLastEndTime(m_iEpgID); - if (!result.IsValid() || (dbResult.IsValid() && dbResult > result)) - result = dbResult; - } - - return result; -} - std::pair<CDateTime, CDateTime> CPVREpgTagsContainer::GetFirstAndLastUncommitedEPGDate() const { if (m_changedTags.empty()) diff --git a/xbmc/pvr/epg/EpgTagsContainer.h b/xbmc/pvr/epg/EpgTagsContainer.h index 3d796f1c34..fcbe0d1757 100644 --- a/xbmc/pvr/epg/EpgTagsContainer.h +++ b/xbmc/pvr/epg/EpgTagsContainer.h @@ -153,18 +153,6 @@ public: std::vector<std::shared_ptr<CPVREpgInfoTag>> GetAllTags() const; /*! - * @brief Get the start time of the first tag in this EPG. - * @return The time. - */ - CDateTime GetFirstStartTime() const; - - /*! - * @brief Get the end time of the last tag in this EPG. - * @return The time. - */ - CDateTime GetLastEndTime() const; - - /*! * @brief Get the start and end time of the last not yet commited entry in this EPG. * @return The times; first: start time, second: end time. */ |