Change SetStartChannel() and SetStopChannel()

This commit is contained in:
kamel5 2019-07-04 13:14:14 +02:00
parent cf171d8732
commit 0b37464dd0
3 changed files with 14 additions and 24 deletions

View File

@ -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) {

View File

@ -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);

View File

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