mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Correct an error with the recording sign in grid
This commit is contained in:
parent
9009f4f385
commit
6f7042d41f
@ -5,21 +5,11 @@ cChannelColumn::cChannelColumn(int num, const cChannel *channel, cMyTime *myTime
|
||||
this->channel = channel;
|
||||
this->num = num;
|
||||
this->myTime = myTime;
|
||||
#if VDRVERSNUM >= 20301
|
||||
hasTimer = false;
|
||||
const cSchedule *Schedule = NULL;
|
||||
LOCK_SCHEDULES_READ;
|
||||
const cSchedules* schedules = Schedules;
|
||||
if (schedules) {
|
||||
Schedule = schedules->GetSchedule(channel);
|
||||
hasTimer = Schedule ? Schedule->HasTimer() : false;
|
||||
}
|
||||
#else
|
||||
#if VDRVERSNUM < 20301
|
||||
hasTimer = channel->HasTimer();
|
||||
#endif
|
||||
hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
|
||||
#if VDRVERSNUM >= 20301
|
||||
#else
|
||||
#if VDRVERSNUM < 20301
|
||||
schedulesLock = new cSchedulesLock(false, 100);
|
||||
#endif
|
||||
header = NULL;
|
||||
@ -29,8 +19,7 @@ cChannelColumn::~cChannelColumn(void) {
|
||||
if (header)
|
||||
delete header;
|
||||
grids.Clear();
|
||||
#if VDRVERSNUM >= 20301
|
||||
#else
|
||||
#if VDRVERSNUM < 20301
|
||||
delete schedulesLock;
|
||||
#endif
|
||||
}
|
||||
@ -383,25 +372,14 @@ cGrid *cChannelColumn::addDummyGrid(time_t start, time_t end, cGrid *firstGrid,
|
||||
}
|
||||
|
||||
void cChannelColumn::SetTimers() {
|
||||
#if VDRVERSNUM >= 20301
|
||||
hasTimer = false;
|
||||
const cSchedule *Schedule = NULL;
|
||||
{
|
||||
LOCK_SCHEDULES_READ;
|
||||
const cSchedules* schedules = Schedules;
|
||||
if (schedules) {
|
||||
Schedule = schedules->GetSchedule(channel);
|
||||
hasTimer = Schedule ? Schedule->HasTimer() : false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if VDRVERSNUM < 20301
|
||||
hasTimer = channel->HasTimer();
|
||||
#endif
|
||||
hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
|
||||
for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
|
||||
bool gridHadTimer = grid->HasTimer();
|
||||
grid->SetTimer();
|
||||
if (gridHadTimer != grid->HasTimer())
|
||||
if (gridHadTimer || gridHadTimer != grid->HasTimer())
|
||||
grid->SetDirty();
|
||||
bool gridHadSwitchTimer = grid->HasSwitchTimer();
|
||||
grid->SetSwitchTimer();
|
||||
|
15
epggrid.c
15
epggrid.c
@ -62,22 +62,23 @@ void cEpgGrid::PositionPixmap() {
|
||||
}
|
||||
|
||||
void cEpgGrid::SetTimer() {
|
||||
hasTimer = false;
|
||||
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
|
||||
RemoteTimers_Event_v1_0 rt;
|
||||
rt.event = event;
|
||||
if (pRemoteTimers->Service("RemoteTimers::GetTimerByEvent-v1.0", &rt))
|
||||
hasTimer = true;
|
||||
else
|
||||
hasTimer = false;
|
||||
#if VDRVERSNUM >= 30400
|
||||
} else if (event->HasTimer()) {
|
||||
hasTimer = true;
|
||||
#if VDRVERSNUM >= 20301
|
||||
} else {
|
||||
eTimerMatch TimerMatch = tmNone;
|
||||
LOCK_TIMERS_READ;
|
||||
const cTimers *timers = Timers;
|
||||
if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull))
|
||||
hasTimer = true;
|
||||
#else
|
||||
} else if (column->HasTimer()) {
|
||||
hasTimer = event->HasTimer();
|
||||
#endif
|
||||
} else {
|
||||
hasTimer = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
16
recmanager.c
16
recmanager.c
@ -50,9 +50,17 @@ bool cRecManager::CheckEventForTimer(const cEvent *event) {
|
||||
pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
|
||||
if (rtMatch.timerMatch == tmFull)
|
||||
hasTimer = true;
|
||||
} else
|
||||
} else {
|
||||
#if VDRVERSNUM >= 20301
|
||||
eTimerMatch TimerMatch = tmNone;
|
||||
LOCK_TIMERS_READ;
|
||||
const cTimers *timers = Timers;
|
||||
if (timers->GetMatch(event, &TimerMatch) && (TimerMatch == tmFull))
|
||||
hasTimer = true;
|
||||
#else
|
||||
hasTimer = event->HasTimer();
|
||||
|
||||
#endif
|
||||
}
|
||||
return hasTimer;
|
||||
}
|
||||
|
||||
@ -175,7 +183,6 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(int timerID) {
|
||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||
#if VDRVERSNUM >= 20301
|
||||
cTimer *t;
|
||||
{
|
||||
@ -191,7 +198,6 @@ void cRecManager::DeleteTimer(int timerID) {
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(const cEvent *event) {
|
||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||
if (!event)
|
||||
return;
|
||||
if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
|
||||
@ -202,7 +208,6 @@ void cRecManager::DeleteTimer(const cEvent *event) {
|
||||
}
|
||||
|
||||
void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||
const cTimer *t;
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
@ -218,7 +223,6 @@ void cRecManager::DeleteLocalTimer(const cEvent *event) {
|
||||
}
|
||||
|
||||
void cRecManager::DeleteTimer(const cTimer *timer) {
|
||||
dsyslog ("%s %s %d\n", __FILE__, __func__, __LINE__);
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_TIMERS_WRITE;
|
||||
cTimers* timers = Timers;
|
||||
|
14
tvguideosd.c
14
tvguideosd.c
@ -139,11 +139,15 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
|
||||
if (!channelStart)
|
||||
return;
|
||||
#if VDRVERSNUM >= 20301
|
||||
const cChannels *channels;
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
for (const cChannel *channel = channelStart; channel; channel = Channels->Next(channel)) {
|
||||
channels = Channels;
|
||||
}
|
||||
#else
|
||||
for (const cChannel *channel = channelStart; channel; channel = Channels.Next(channel)) {
|
||||
cChannels *channels = &Channels;
|
||||
#endif
|
||||
for (const cChannel *channel = channelStart; channel; channel = channels->Next(channel)) {
|
||||
if (!channel->GroupSep()) {
|
||||
if (channelGroups->IsInLastGroup(channel)) {
|
||||
break;
|
||||
@ -165,11 +169,7 @@ void cTvGuideOsd::readChannels(const cChannel *channelStart) {
|
||||
int numCurrent = columns.Count();
|
||||
int numBack = tvguideConfig.numGrids - numCurrent;
|
||||
int newChannelNumber = columns.First()->getChannel()->Number() - numBack;
|
||||
#if VDRVERSNUM >= 20301
|
||||
const cChannel *newStart = Channels->GetByNumber(newChannelNumber);
|
||||
#else
|
||||
const cChannel *newStart = Channels.GetByNumber(newChannelNumber);
|
||||
#endif
|
||||
const cChannel *newStart = channels->GetByNumber(newChannelNumber);
|
||||
readChannels(newStart);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user