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 *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; };