summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-04 13:14:14 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-04 13:16:13 +0200
commit0b37464dd08361f3cc8ac2a3ee25a068418c4419 (patch)
tree6d71c2c42c1c4f3142bc19bcc44beefc8af2aba0
parentcf171d8732e18a6889188e2ad25b392500cb6e88 (diff)
downloadvdr-plugin-tvguide-0b37464dd08361f3cc8ac2a3ee25a068418c4419.tar.gz
vdr-plugin-tvguide-0b37464dd08361f3cc8ac2a3ee25a068418c4419.tar.bz2
Change SetStartChannel() and SetStopChannel()
-rw-r--r--recmenus.c14
-rw-r--r--searchtimer.c20
-rw-r--r--searchtimer.h4
3 files changed, 14 insertions, 24 deletions
diff --git a/recmenus.c b/recmenus.c
index 8d80cc3..3b1d334 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -915,8 +915,18 @@ cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) {
searchTimer.SetUseSubtitle(sT.useSubtitle);
searchTimer.SetUseDesription(sT.useDescription);
if (sT.useChannel == 1) {
- searchTimer.SetStartChannel(startChannel);
- searchTimer.SetStopChannel(stopChannel);
+#if VDRVERSNUM >= 20301
+ {
+ LOCK_CHANNELS_READ;
+ sT.channelMin = Channels->GetByNumber(startChannel);
+ sT.channelMax = Channels->GetByNumber(stopChannel);
+ }
+#else
+ sT.channelMin = Channels.GetByNumber(startChannel);
+ sT.channelMax = Channels.GetByNumber(stopChannel);
+#endif
+ searchTimer.SetStartChannel(sT.channelMin);
+ searchTimer.SetStopChannel(sT.channelMax);
}
if (sT.useChannel == 2) {
if (channelgroups.size() > 0) {
diff --git a/searchtimer.c b/searchtimer.c
index bbff61e..f46e163 100644
--- a/searchtimer.c
+++ b/searchtimer.c
@@ -608,26 +608,6 @@ void cTVGuideSearchTimer::GetDelModes(std::vector<std::string> *delModes) {
delModes->push_back(tr("count days"));
}
-void cTVGuideSearchTimer::SetStartChannel(int startChannel)
-{
-#if VDRVERSNUM >= 20301
- LOCK_CHANNELS_READ;
- channelMin = Channels->GetByNumber(startChannel);
-#else
- channelMin = Channels.GetByNumber(startChannel);
-#endif
-};
-
-void cTVGuideSearchTimer::SetStopChannel(int stopChannel)
-{
-#if VDRVERSNUM >= 20301
- LOCK_CHANNELS_READ;
- channelMax = Channels->GetByNumber(stopChannel);
-#else
- channelMax = Channels.GetByNumber(stopChannel);
-#endif
-};
-
void cTVGuideSearchTimer::Dump(void) {
esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str());
esyslog("tvguide searchtimer: ID: %d", ID);
diff --git a/searchtimer.h b/searchtimer.h
index 2494996..b47dc97 100644
--- a/searchtimer.h
+++ b/searchtimer.h
@@ -90,8 +90,8 @@ public:
void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
void SetUseDesription(bool useDescription) { this->useDescription = useDescription; };
void SetUseChannel(int useChannel) { this->useChannel = useChannel; };
- void SetStartChannel(int startChannel);
- void SetStopChannel(int stopChannel);
+ void SetStartChannel(const cChannel *channelMin) { this->channelMin = channelMin; };
+ void SetStopChannel(const cChannel *channelMax) { this->channelMax = channelMax; };
void SetChannelGroup(std::string channelGroup) { this->channelGroup = channelGroup; };
void SetUseTime(bool useTime) { this->useTime = useTime; };
void SetStartTime(int startTime) { this->startTime = startTime; };