Skip to content

Commit

Permalink
Merge pull request xbmc#6498 from xhaggi/pvr-cleanup-epginfotag
Browse files Browse the repository at this point in the history
[epg] cleanup for CEpgInfoTag
  • Loading branch information
MartijnKaijser committed Mar 1, 2015
2 parents cc463a2 + 056e017 commit f31bb69
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 573 deletions.
7 changes: 3 additions & 4 deletions xbmc/epg/Epg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ CEpgInfoTagPtr CEpg::GetTagNext() const
/* return the first event that is in the future */
for (map<CDateTime, CEpgInfoTagPtr>::const_iterator it = m_tags.begin(); it != m_tags.end(); ++it)
{
if (it->second->InTheFuture())
if (it->second->IsUpcoming())
return it->second;
}
}
Expand Down Expand Up @@ -302,9 +302,8 @@ void CEpg::AddEntry(const CEpgInfoTag &tag)
{
newTag->Update(tag);
newTag->SetPVRChannel(m_pvrChannel);
newTag->m_epg = this;
newTag->SetEpg(this);
UpdateRecording(newTag);
newTag->m_bChanged = false;
}
}

Expand All @@ -328,7 +327,7 @@ bool CEpg::UpdateEntry(const CEpgInfoTag &tag, bool bUpdateDatabase /* = false *
}

infoTag->Update(tag, bNewTag);
infoTag->m_epg = this;
infoTag->SetEpg(this);
infoTag->SetPVRChannel(m_pvrChannel);
UpdateRecording(infoTag);

Expand Down
1 change: 0 additions & 1 deletion xbmc/epg/Epg.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ namespace EPG
class CEpg : public Observable
{
friend class CEpgDatabase;
friend class CEpgInfoTag;

public:
/*!
Expand Down
4 changes: 2 additions & 2 deletions xbmc/epg/EpgDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ int CEpgDatabase::Persist(const CEpgInfoTag &tag, bool bSingleUpdate /* = true *
tag.EpgID(), iStartTime, iEndTime,
tag.Title(true).c_str(), tag.PlotOutline(true).c_str(), tag.Plot(true).c_str(), tag.Icon().c_str(), tag.GenreType(), tag.GenreSubType(), strGenre.c_str(),
iFirstAired, tag.ParentalRating(), tag.StarRating(), tag.Notify(),
tag.SeriesNum(), tag.EpisodeNum(), tag.EpisodePart(), tag.EpisodeName().c_str(),
tag.SeriesNumber(), tag.EpisodeNumber(), tag.EpisodePart(), tag.EpisodeName().c_str(),
tag.UniqueBroadcastID(), tag.RecordingId().c_str());
}
else
Expand All @@ -358,7 +358,7 @@ int CEpgDatabase::Persist(const CEpgInfoTag &tag, bool bSingleUpdate /* = true *
tag.EpgID(), iStartTime, iEndTime,
tag.Title(true).c_str(), tag.PlotOutline(true).c_str(), tag.Plot(true).c_str(), tag.Icon().c_str(), tag.GenreType(), tag.GenreSubType(), strGenre.c_str(),
iFirstAired, tag.ParentalRating(), tag.StarRating(), tag.Notify(),
tag.SeriesNum(), tag.EpisodeNum(), tag.EpisodePart(), tag.EpisodeName().c_str(),
tag.SeriesNumber(), tag.EpisodeNumber(), tag.EpisodePart(), tag.EpisodeName().c_str(),
tag.UniqueBroadcastID(), iBroadcastId, tag.RecordingId().c_str());
}

Expand Down
Loading

0 comments on commit f31bb69

Please sign in to comment.