aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxhaggi <sascha.woo@gmail.com>2014-07-15 22:05:06 +0200
committerxhaggi <sascha.woo@gmail.com>2014-07-15 22:07:16 +0200
commit15dc38c771d2163ebc259e5b29fc5ee8b7e6c12f (patch)
tree174787d894bc9639292fe2c394ea78dd4954333a
parentadc541e9c194d0d9a85cfe4e4cf5016a28e6a8f8 (diff)
[epg] refactor Update() method into constructor as it's never used elsewhere
-rw-r--r--xbmc/epg/EpgInfoTag.cpp54
-rw-r--r--xbmc/epg/EpgInfoTag.h6
2 files changed, 24 insertions, 36 deletions
diff --git a/xbmc/epg/EpgInfoTag.cpp b/xbmc/epg/EpgInfoTag.cpp
index 22501d4202..e2000d1adf 100644
--- a/xbmc/epg/EpgInfoTag.cpp
+++ b/xbmc/epg/EpgInfoTag.cpp
@@ -98,7 +98,30 @@ CEpgInfoTag::CEpgInfoTag(const EPG_TAG &data) :
CPVRTimerInfoTagPtr emptyTimer;
m_timer = emptyTimer;
- Update(data);
+ SetStartFromUTC(data.startTime + g_advancedSettings.m_iPVRTimeCorrection);
+ SetEndFromUTC(data.endTime + g_advancedSettings.m_iPVRTimeCorrection);
+ SetGenre(data.iGenreType, data.iGenreSubType, data.strGenreDescription);
+ SetParentalRating(data.iParentalRating);
+ SetUniqueBroadcastID(data.iUniqueBroadcastId);
+ SetNotify(data.bNotify);
+ SetFirstAiredFromUTC(data.firstAired + g_advancedSettings.m_iPVRTimeCorrection);
+ SetEpisodeNum(data.iEpisodeNumber);
+ SetEpisodePart(data.iEpisodePartNumber);
+ SetStarRating(data.iStarRating);
+
+ // explicit NULL check, because there is no implicit NULL constructor for std::string
+ if (data.strTitle)
+ SetTitle(data.strTitle);
+ if (data.strPlotOutline)
+ SetPlotOutline(data.strPlotOutline);
+ if (data.strPlot)
+ SetPlot(data.strPlot);
+ if (data.strEpisodeName)
+ SetEpisodeName(data.strEpisodeName);
+ if (data.strIconPath)
+ SetIcon(data.strIconPath);
+ if (data.strRecordingId)
+ SetRecordingId(data.strRecordingId);
}
CEpgInfoTag::CEpgInfoTag(const CEpgInfoTag &tag) :
@@ -883,35 +906,6 @@ const PVR::CPVRChannelPtr CEpgInfoTag::ChannelTag(void) const
return m_pvrChannel;
}
-void CEpgInfoTag::Update(const EPG_TAG &tag)
-{
- CSingleLock lock(m_critSection);
- SetStartFromUTC(tag.startTime + g_advancedSettings.m_iPVRTimeCorrection);
- SetEndFromUTC(tag.endTime + g_advancedSettings.m_iPVRTimeCorrection);
- SetGenre(tag.iGenreType, tag.iGenreSubType, tag.strGenreDescription);
- SetParentalRating(tag.iParentalRating);
- SetUniqueBroadcastID(tag.iUniqueBroadcastId);
- SetNotify(tag.bNotify);
- SetFirstAiredFromUTC(tag.firstAired + g_advancedSettings.m_iPVRTimeCorrection);
- SetEpisodeNum(tag.iEpisodeNumber);
- SetEpisodePart(tag.iEpisodePartNumber);
- SetStarRating(tag.iStarRating);
-
- // explicit NULL check, because there is no implicit NULL constructor for std::string
- if (tag.strTitle)
- SetTitle(tag.strTitle);
- if (tag.strPlotOutline)
- SetPlotOutline(tag.strPlotOutline);
- if (tag.strPlot)
- SetPlot(tag.strPlot);
- if (tag.strEpisodeName)
- SetEpisodeName(tag.strEpisodeName);
- if (tag.strIconPath)
- SetIcon(tag.strIconPath);
- if (tag.strRecordingId)
- SetRecordingId(tag.strRecordingId);
-}
-
bool CEpgInfoTag::Update(const CEpgInfoTag &tag, bool bUpdateBroadcastId /* = true */)
{
bool bChanged(false);
diff --git a/xbmc/epg/EpgInfoTag.h b/xbmc/epg/EpgInfoTag.h
index 8e3f98fd6b..3d839fd6be 100644
--- a/xbmc/epg/EpgInfoTag.h
+++ b/xbmc/epg/EpgInfoTag.h
@@ -460,12 +460,6 @@ namespace EPG
/*!
* @brief Update the information in this tag with the info in the given tag.
* @param tag The new info.
- */
- void Update(const EPG_TAG &tag);
-
- /*!
- * @brief Update the information in this tag with the info in the given tag.
- * @param tag The new info.
* @param bUpdateBroadcastId If set to false, the tag BroadcastId (locally unique) will not be chacked/updated
* @return True if something changed, false otherwise.
*/