[SCM] kodi-pvr-hts/master: remove Schedule::channel and use the schedule's ID to represent the channel ID it belongs to
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Wed Mar 2 23:01:44 UTC 2016
The following commit has been merged in the master branch:
commit 631faafec2f9e5f192decfd6d67be766af7a1ef4
Author: Sam Stenvall <neggelandia at gmail.com>
Date: Sun Jul 26 20:20:04 2015 +0300
remove Schedule::channel and use the schedule's ID to represent the channel ID
it belongs to
diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
index ac5791a..b8b51ce 100644
--- a/src/Tvheadend.cpp
+++ b/src/Tvheadend.cpp
@@ -1438,7 +1438,7 @@ void CTvheadend::SyncEpgCompleted ( void )
/* Trigger updates */
for (const auto &entry : m_schedules)
- TriggerEpgUpdate(entry.second.channel);
+ TriggerEpgUpdate(entry.second.GetId());
}
void CTvheadend::ParseTagAddOrUpdate ( htsmsg_t *msg, bool bAdd )
@@ -1893,7 +1893,7 @@ void CTvheadend::ParseEventAddOrUpdate ( htsmsg_t *msg, bool bAdd )
Schedule &sched = m_schedules[tmp.GetChannel()];
Event &evt = sched.events[tmp.GetId()];
Event comparison = evt;
- sched.channel = tmp.GetChannel();
+ sched.SetId(tmp.GetChannel());
evt.SetId(tmp.GetId());
evt.SetDirty(false);
@@ -1935,9 +1935,9 @@ void CTvheadend::ParseEventDelete ( htsmsg_t *msg )
if (eit != events.end())
{
- tvhtrace("deleted event %d from channel %d", u32, schedule.channel);
+ tvhtrace("deleted event %d from channel %d", u32, schedule.GetId());
events.erase(eit);
- TriggerEpgUpdate(schedule.channel);
+ TriggerEpgUpdate(schedule.GetId());
return;
}
}
diff --git a/src/tvheadend/entity/Schedule.h b/src/tvheadend/entity/Schedule.h
index d5e7905..298f55c 100644
--- a/src/tvheadend/entity/Schedule.h
+++ b/src/tvheadend/entity/Schedule.h
@@ -35,13 +35,12 @@ namespace tvheadend
typedef std::vector<Event> Segment;
/**
- * Represents a schedule. A schedule has a channel and a bunch of events.
+ * Represents a schedule. A schedule has a channel and a bunch of events.
+ * The schedule ID matches the channel it belongs to.
*/
class Schedule : public Entity
{
public:
- Schedule() : channel(0) {}
-
virtual void SetDirty(bool dirty);
/**
@@ -50,7 +49,6 @@ namespace tvheadend
*/
Segment GetSegment(time_t startTime, time_t endTime) const;
- uint32_t channel;
Events events;
};
}
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list