10 Commits

Author SHA1 Message Date
kamel5
5870b1ae4c Version 1.3.1 2020-03-11 15:08:32 +01:00
kamel5
69b851c9ed Fixed a segfault 2020-03-11 14:59:03 +01:00
kamel5
8335ab0e41 Fixes for <VDR-2.3.1 compatibility 2020-03-07 16:55:49 +01:00
kamel5
240cbe87e0 Version 1.3.0 2020-03-06 14:03:36 +01:00
kamel5
ee68d2eb2f Fixed messages in DisplayTimerConflict 2020-03-06 14:01:47 +01:00
kamel5
eb3a4113be Fixed horizontal alignment in timeline 2020-03-06 14:01:47 +01:00
kamel5
7ec89bf12b Fixed stopIndex in cRecMenu::JumpBegin 2020-03-06 14:01:47 +01:00
kamel5
f653594c4a Fixes for <VDR-2.3.1 compatibility 2020-03-04 15:26:27 +01:00
kamel5
8129d116fb Show numTimersToday in timeline 2020-03-02 13:33:58 +01:00
kamel5
874f5cd9d5 Fixed a problem in DisplayTimerConflict 2020-03-02 12:47:04 +01:00
11 changed files with 136 additions and 76 deletions

14
HISTORY
View File

@@ -256,3 +256,17 @@ Version 1.2.17
- Final fix for utf8 CutText
- Fixed a remote timer problem
- Add episode to manual timer
Version 1.3.0
- last version with <VDR-2.3.1 compatibility
- Fixed a possible seqfault in DisplayTimerConflict
- Show numTimersToday in timeline
- Fixed stopIndex in cRecMenu::JumpBegin
- Fixed horizontal alignment in timeline
- Fixed messages in DisplayTimerConflict
Version 1.3.1
- Fixes for <VDR-2.3.1 compatibility
- Fixed a segfault while starting tvguide

View File

@@ -7,7 +7,7 @@ cOsdManager::cOsdManager(void) {
bool cOsdManager::setOsd() {
osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
if (osd) {
tArea Area = { 0, 0, cOsd::OsdWidth(), cOsd::OsdHeight(), 32 };
tArea Area = { 0, 0, cOsd::OsdWidth() - 1, cOsd::OsdHeight() - 1, 32 };
if (osd->SetAreas(&Area, 1) == oeOk) {
return true;
}

View File

@@ -130,7 +130,7 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
isyslog("timer %s added (active)", *timer->ToDescr());
#endif
}
return timer;
return timers->GetTimer(timer);
}
cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
@@ -280,10 +280,11 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
esyslog(tr("tvguide: RemoteTimerModifications failed"));
}
}
cTimer *timer = timers->GetTimer(t);
#else
cTimers* timers = &Timers;
cTimer *timer = timers->GetTimer((cTimer *)t);
#endif
cTimer *timer = timers->GetTimer(t);
if (!timer) {
return;
}
@@ -317,11 +318,7 @@ void cRecManager::SaveTimer(const cTimer *t, cTimer *newTimerSettings) {
rt.timer = NULL;
RefreshRemoteTimers();
} else {
#if VDRVERSNUM >= 20301
timers->SetModified();
#else
timers.SetModified();
#endif
}
}

View File

@@ -441,7 +441,7 @@ void cRecMenu::JumpBegin(void) {
CreatePixmap();
Arrange(false);
startIndex = 0;
stopIndex = numItems - 1;
stopIndex = currentItem;
cRecMenuItem *first = menuItems.front();
first->setActive();
first->setBackground();
@@ -589,10 +589,14 @@ void cRecMenu::UpdateActiveMenuItem(void) {
void cRecMenu::DrawScrollBar(void) {
if (!pixmapScrollBar)
return;
pixmapScrollBar->Fill(theme.Color(clrBorder));
pixmapScrollBar->DrawRectangle(cRect(2,2,pixmapScrollBar->ViewPort().Width()-4, pixmapScrollBar->ViewPort().Height() - 4), theme.Color(clrBackground));
int totalNumItems = GetTotalNumMenuItems();
if (!totalNumItems)
return;
if (imgScrollBar == NULL) {
int scrollBarImgHeight = (pixmapScrollBar->ViewPort().Height() - 8) * numItems / totalNumItems;
imgScrollBar = createScrollbar(pixmapScrollBar->ViewPort().Width()-8, scrollBarImgHeight, theme.Color(clrHighlight), theme.Color(clrHighlightBlending));

View File

@@ -1548,6 +1548,7 @@ cRecMenuItemTimer::cRecMenuItemTimer(const cTimer *timer,
this->overlapStop = overlapStop;
this->active = active;
height = 3 * font->Height();
pixmapStatus = NULL;
pixmapIcons = NULL;
}
@@ -1585,6 +1586,8 @@ void cRecMenuItemTimer::Show(void) {
}
void cRecMenuItemTimer::Draw(void) {
if (!timer)
return;
const cChannel *channel = timer->Channel();
int channelTransponder = 0;
cString channelName = "";
@@ -1740,8 +1743,13 @@ cRecMenuItemTimerConflictHeader::~cRecMenuItemTimerConflictHeader(void) {
}
void cRecMenuItemTimerConflictHeader::SetPixmaps(void) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height));
pixmapStatus = osdManager.requestPixmap(5, cRect(x, y, width, height));
if (!pixmap) {
pixmap = osdManager.requestPixmap(4, cRect(x, y, width, height));
pixmapStatus = osdManager.requestPixmap(5, cRect(x, y, width, height));
} else {
pixmap->SetViewPort(cRect(x, y, width, height));
pixmapStatus->SetViewPort(cRect(x, y, width, height));
}
pixmapStatus->Fill(clrTransparent);
}
@@ -2304,13 +2312,14 @@ void cRecMenuItemRecording::Show(void) {
}
// --- cRecMenuItemTimelineHeader -------------------------------------------------------
cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day, std::vector<cTVGuideTimerConflict*> conflictsToday) {
cRecMenuItemTimelineHeader::cRecMenuItemTimelineHeader(time_t day, int numTimersToday, std::vector<cTVGuideTimerConflict*> conflictsToday) {
conflicts = conflictsToday;
pixmapTimeline = NULL;
pixmapTimerInfo = NULL;
pixmapTimerConflicts = NULL;
timer = NULL;
this->day = day;
this->numTimersToday = numTimersToday;
selectable = false;
active = false;
height = 5 * font->Height();
@@ -2359,7 +2368,7 @@ void cRecMenuItemTimelineHeader::Draw(void) {
}
DrawTimerConflicts();
pixmap->Fill(clrTransparent);
cString headerText = tr("Timers for");
cString headerText = cString::sprintf("%i %s", numTimersToday, tr("Timers for"));
cString dateText = DateString(day);
cString header = cString::sprintf("%s: %s", *headerText, *dateText);
int xText = (width - fontLarge->Width(*header)) / 2;
@@ -2421,7 +2430,7 @@ void cRecMenuItemTimelineHeader::DrawTimeline(void) {
pixmapTimeline->Fill(clrTransparent);
width5Mins = (float)width * 5.0 / 24.0 / 60.0;
int widthHour = 12 * width5Mins;
x0 = (width - 24*widthHour)/2;
x0 = (width - (24 * widthHour)) / 2;
int barHeight = fontSmall->Height();
int y = height - barHeight;
tColor col1 = theme.Color(clrTimeline1);
@@ -2526,7 +2535,8 @@ void cRecMenuItemTimelineTimer::SetPixmaps(void) {
}
width5Mins = (float)width * 5.0 / 24.0 / 60.0;
x0 = (width - 24*12*width5Mins)/2;
int widthHour = 12 * width5Mins;
x0 = (width - (24 * widthHour)) / 2;
}
void cRecMenuItemTimelineTimer::Draw(void) {

View File

@@ -573,19 +573,21 @@ private:
cPixmap *pixmapTimeline;
cPixmap *pixmapTimerInfo;
cPixmap *pixmapTimerConflicts;
int width5Mins;
float width5Mins;
int x0;
int numTimersToday;
bool timelineDrawn;
void DrawTimeline(void);
void DrawTimerConflicts(void);
void DrawCurrentTimer(void);
public:
cRecMenuItemTimelineHeader(time_t day, std::vector<cTVGuideTimerConflict*> conflictsToday);
cRecMenuItemTimelineHeader(time_t day, int numTimersToday, std::vector<cTVGuideTimerConflict*> conflictsToday);
virtual ~cRecMenuItemTimelineHeader(void);
void SetDay(time_t day) { this->day = day; };
void SetPixmaps(void);
void SetCurrentTimer(const cTimer *timer) { this->timer = timer; };
void UnsetCurrentTimer(void) { timer = NULL; };
void SetNumTimersToday(int numTimersToday) { this->numTimersToday = numTimersToday; };
void RefreshTimerDisplay(void);
void Hide(void);
void Show(void);
@@ -601,7 +603,7 @@ private:
cPixmap *pixmapTimerConflicts;
cRecMenuItemTimelineHeader *header;
int x0;
int width5Mins;
float width5Mins;
time_t start;
time_t stop;
void DrawBackground(void);

View File

@@ -194,8 +194,9 @@ cRecMenuAskDeleteTimer::cRecMenuAskDeleteTimer(const cEvent *event) {
// --- cRecMenuTimerConflicts ---------------------------------------------------------
cRecMenuTimerConflicts::cRecMenuTimerConflicts(cTVGuideTimerConflicts *conflicts) {
int numConflicts = conflicts->NumConflicts();
SetWidthPercent(50);
int numConflicts = (conflicts) ? conflicts->NumConflicts() : 0;
cString text;
if (numConflicts == 1) {
text = cString::sprintf("%s %s %s", tr("One"), tr("Timer Conflict"), tr("detected"));
@@ -230,19 +231,21 @@ int cRecMenuTimerConflicts::GetTimerConflict(void) {
}
// --- cRecMenuTimerConflict ---------------------------------------------------------
cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict) {
cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eRecMenuState nextAction) {
SetWidthPercent(95);
this->conflict = conflict;
SetHeader(new cRecMenuItemTimerConflictHeader(conflict->timeStart,
conflict->timeStop,
conflict->overlapStart,
totalNumMenuItems = (int)conflict->timerIDs.size();
SetHeader(new cRecMenuItemTimerConflictHeader(conflict->timeStart,
conflict->timeStop,
conflict->overlapStart,
conflict->overlapStop));
SetFooter(new cRecMenuItemButton(tr("Ignore Conflict"), rmsIgnoreTimerConflict, false, true));
SetFooter(new cRecMenuItemButton(tr("Ignore Conflict"), nextAction, false, true));
int i=0;
for(std::vector<int>::iterator it = conflict->timerIDs.begin(); it != conflict->timerIDs.end(); it++) {
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(*it);
const cTimer *timer = Timers->GetById(*it + 1);
#else
const cTimer *timer = Timers.Get(*it);
#endif
@@ -268,7 +271,7 @@ cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict) {
}
cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
if ((number >= 0) && (number < (int)conflict->timerIDs.size())) {
if ((number >= 0) && (number < totalNumMenuItems)) {
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(conflict->timerIDs[number]);
@@ -290,8 +293,8 @@ cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
return NULL;
}
int cRecMenuTimerConflict::GetTotalNumMenuItems(void) {
return conflict->timerIDs.size();
int cRecMenuTimerConflict::GetTotalNumMenuItems(void) {
return totalNumMenuItems;
}
int cRecMenuTimerConflict::GetTimerConflictIndex(void) {
@@ -1410,8 +1413,8 @@ cRecMenuTimeline::cRecMenuTimeline(cTVGuideTimerConflicts *timerConflicts) {
SetStartStop();
conflictsToday = timerConflicts->GetConflictsBetween(timeStart, timeStop);
GetTimersForDay();
SetWidthPercent(95);
header = new cRecMenuItemTimelineHeader(timeStart, conflictsToday);
SetWidthPercent(90);
header = new cRecMenuItemTimelineHeader(timeStart, numTimersToday, conflictsToday);
SetHeader(header);
cRecMenuItem *footer = new cRecMenuItemButton(tr("Close"), rmsClose, false, true);
SetFooter(footer);
@@ -1432,9 +1435,6 @@ void cRecMenuTimeline::GetTimersForDay(void) {
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
const cTimers* timers = Timers;
#else
const cTimers* timers = &Timers;
#endif
cSortedTimers SortedTimers(timers);
int i = 0;
while (i < SortedTimers.Size()) {
@@ -1445,17 +1445,29 @@ void cRecMenuTimeline::GetTimersForDay(void) {
}
i++;
}
#else
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
timersToday.push_back(t);
}
}
#endif
numTimersToday = timersToday.size();
}
void cRecMenuTimeline::SetTimers(void) {
ClearMenu();
GetTimersForDay();
conflictsToday = timerConflicts->GetConflictsBetween(timeStart, timeStop);
header->UnsetCurrentTimer();
header->SetDay(timeStart);
header->RefreshTimerDisplay();
header->SetNumTimersToday(numTimersToday);
if (numTimersToday == 0) {
AddMenuItem(new cRecMenuItemTimelineTimer(NULL, 0, 0, conflictsToday, header, false));
header->UnsetCurrentTimer();
footer->setActive();
} else {
for (int i=0; i<numTimersToday; i++) {
for (int i = 0; i<numTimersToday; i++) {
cRecMenuItemTimelineTimer *item = new cRecMenuItemTimelineTimer(timersToday[i], timeStart, timeStop, conflictsToday, header, false);
if (i==0)
item->setActive();
@@ -1474,12 +1486,6 @@ void cRecMenuTimeline::PrevDay(void) {
return;
timeStart -= 3600*24;
timeStop -= 3600*24;
conflictsToday = timerConflicts->GetConflictsBetween(timeStart, timeStop);
SetWidthPercent(95);
header->SetDay(timeStart);
header->UnsetCurrentTimer();
header->RefreshTimerDisplay();
GetTimersForDay();
SetTimers();
Display();
}
@@ -1487,12 +1493,6 @@ void cRecMenuTimeline::PrevDay(void) {
void cRecMenuTimeline::NextDay(void) {
timeStart += 3600*24;
timeStop += 3600*24;
conflictsToday = timerConflicts->GetConflictsBetween(timeStart, timeStop);
SetWidthPercent(95);
header->SetDay(timeStart);
header->UnsetCurrentTimer();
header->RefreshTimerDisplay();
GetTimersForDay();
SetTimers();
Display();
}

View File

@@ -77,11 +77,12 @@ public:
class cRecMenuTimerConflict: public cRecMenu {
private:
cTVGuideTimerConflict *conflict;
int totalNumMenuItems;
public:
cRecMenuTimerConflict(cTVGuideTimerConflict *conflict);
cRecMenuTimerConflict(cTVGuideTimerConflict *conflict, eRecMenuState nextAction = rmsClose);
virtual ~cRecMenuTimerConflict(void) {};
cRecMenuItem *GetMenuItem(int number);
int GetTotalNumMenuItems(void);
virtual ~cRecMenuTimerConflict(void) {};
int GetTimerConflictIndex(void);
};

View File

@@ -93,16 +93,18 @@ void cRecMenuView::DisplaySearchTimerList(void) {
}
bool cRecMenuView::DisplayTimerConflict(const cTimer *timer) {
int timerID = 0;
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
for (const cTimer *t = Timers->First(); t; t = Timers->Next(t)) {
if (t == timer)
return DisplayTimerConflict(timer->Id() - 1);
#else
int timerID = 0;
for (const cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
#endif
if (t == timer)
return DisplayTimerConflict(timerID);
timerID++;
#endif
}
return false;
}
@@ -119,7 +121,7 @@ bool cRecMenuView::DisplayTimerConflict(int timerID) {
cTVGuideTimerConflict *conflict = timerConflicts->GetCurrentConflict();
if (!conflict)
return false;
activeMenu = new cRecMenuTimerConflict(conflict);
activeMenu = new cRecMenuTimerConflict(conflict, rmsIgnoreTimerConflict);
activeMenu->Display();
return true;
}
@@ -229,12 +231,18 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerIndex = menu->GetTimerConflictIndex();
} else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
const cTimers* timers;
#if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex) + 1;
{
LOCK_TIMERS_READ;
const cTimer *t = Timers->Get(timerID);
timers = Timers;
}
const cTimer *t = timers->GetById(timerID);
#else
const cTimer *t = Timers.Get(timerID);
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
timers = &Timers;
const cTimer *t = timers->Get(timerID);
#endif
if (t) {
const cEvent *ev = t->Event();
@@ -250,20 +258,24 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerIndex = menu->GetTimerConflictIndex();
} else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
const cTimers* timers;
const cEvent *event;
#if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex) + 1;
{
LOCK_TIMERS_READ;
timers = Timers;
}
event = timers->GetById(timerID)->Event();
#else
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
timers = &Timers;
event = timers->Get(timerID)->Event();
#endif
recManager->DeleteTimer(timers->Get(timerID)->Event());
recManager->DeleteTimer(event);
delete activeMenu;
if (!DisplayTimerConflict(timerID)) {
activeMenu = new cRecMenuConfirmTimer(timers->Get(timerID)->Event());
activeMenu = new cRecMenuConfirmDeleteTimer(event);
activeMenu->Display();
}
break; }
@@ -274,12 +286,18 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerIndex = menu->GetTimerConflictIndex();
} else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
const cTimers* timers;
#if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex) + 1;
{
LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(timerID);
timers = Timers;
}
const cTimer *timer = timers->GetById(timerID);
#else
const cTimer *timer = Timers.Get(timerID);
int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
timers = &Timers;
const cTimer *timer = timers->Get(timerID);
#endif
if (timer) {
delete activeMenu;
@@ -648,7 +666,7 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
} else break;
timerConflicts->SetCurrentConflict(timerConflict);
delete activeMenu;
activeMenu = new cRecMenuTimerConflict(timerConflicts->GetCurrentConflict());
activeMenu = new cRecMenuTimerConflict(timerConflicts->GetCurrentConflict(), rmsTimerConflicts);
activeMenu->Display();
break; }
case rmsSearchRerunsTimerConflictMenu: {
@@ -660,12 +678,18 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
if (cRecMenuTimerConflict *menu = dynamic_cast<cRecMenuTimerConflict*>(activeMenu)) {
timerConflict = menu->GetTimerConflictIndex();
} else break;
int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict);
const cTimers* timers;
#if VDRVERSNUM >= 20301
int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict) + 1;
{
LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(timerID);
timers = Timers;
}
const cTimer *timer = timers->GetById(timerID);
#else
cTimer *timer = Timers.Get(timerID);
int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict);
timers = &Timers;
const cTimer *timer = timers->Get(timerID);
#endif
if (timer) {
const cEvent *event = timer->Event();
@@ -707,12 +731,16 @@ eOSState cRecMenuView::StateMachine(eRecMenuState nextState) {
originalConflictIndex = menu->GetTimerConflictIndex();
} else break;
int originalTimerID = timerConflicts->GetCurrentConflictTimerID(originalConflictIndex);
const cTimers* timers;
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_READ;
const cTimer *timerOriginal = Timers->Get(originalTimerID);
timers = Timers;
}
#else
cTimer *timerOriginal = Timers.Get(originalTimerID);
timers = &Timers;
#endif
const cTimer *timerOriginal = timers->Get(originalTimerID);
if (replace && timerOriginal) {
recManager->DeleteTimer(timerOriginal->Event());
recManager->createTimer(replace);

View File

@@ -16,12 +16,11 @@ cTVGuideTimerConflict::cTVGuideTimerConflict(void) {
}
cTVGuideTimerConflict::~cTVGuideTimerConflict(void) {
}
bool cTVGuideTimerConflict::timerInvolved(int involvedID) {
int numConflicts = timerIDs.size();
for (int i=0; i<numConflicts; i++) {
for (int i = 0; i < numConflicts; i++) {
if (timerIDs[i] == involvedID)
return true;
}
@@ -44,13 +43,12 @@ cTVGuideTimerConflicts::~cTVGuideTimerConflicts(void) {
}
void cTVGuideTimerConflicts::AddConflict(std::string epgSearchConflictLine) {
/* TIMERCONFLICT FORMAT:
/* TIMERCONFLICT FORMAT:
The result list looks like this for example when we have 2 timer conflicts at one time:
1190232780:152|30|50#152#45:45|10|50#152#45
'1190232780' is the time of the conflict in seconds since 1970-01-01.
It's followed by list of timers that have a conflict at this time:
'152|30|50#1 int editTimer(cTimer *timer, bool active, int prio, int start, int stop);
52#45' is the description of the first conflicting timer. Here:
'152|30|50#152#45' is the description of the first conflicting timer. Here:
'152' is VDR's timer id of this timer as returned from VDR's LSTT command
'30' is the percentage of recording that would be done (0...100)
'50#152#45' is the list of concurrent timers at this conflict
@@ -86,11 +84,13 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) {
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
const cTimers* timers = Timers;
for (int j=0; j < numTimers; j++) {
const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1);
#else
const cTimers* timers = &Timers;
#endif
for (int j=0; j < numTimers; j++) {
const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]);
#endif
if (timer) {
if (!unionSet) {
unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime());
@@ -109,7 +109,11 @@ void cTVGuideTimerConflicts::CalculateConflicts(void) {
cTimeInterval *intersect = NULL;
for (int j=0; j < numTimers; j++) {
#if VDRVERSNUM >= 20301
const cTimer *timer = timers->GetById(conflicts[i]->timerIDs[j] + 1);
#else
const cTimer *timer = timers->Get(conflicts[i]->timerIDs[j]);
#endif
if (timer) {
if (!intersect) {
intersect = new cTimeInterval(timer->StartTime(), timer->StopTime());
@@ -152,7 +156,7 @@ int cTVGuideTimerConflicts::GetCurrentConflictTimerID(int timerIndex) {
int cTVGuideTimerConflicts::GetCorrespondingConflict(int timerID) {
int conflictIndex = -1;
if (numConflicts > 0) {
for (int i=0; i<numConflicts; i++) {
for (int i = 0; i < numConflicts; i++) {
if (conflicts[i]->timerInvolved(timerID)) {
conflictIndex = i;
break;
@@ -172,7 +176,7 @@ cTVGuideTimerConflict *cTVGuideTimerConflicts::GetConflict(int conflictIndex) {
std::vector<cTVGuideTimerConflict*> cTVGuideTimerConflicts::GetConflictsBetween(time_t start, time_t stop) {
std::vector<cTVGuideTimerConflict*> conflictsFound;
for (int i=0; i < numConflicts; i++) {
for (int i = 0; i < numConflicts; i++) {
if ((conflicts[i]->timeStart > start) && (conflicts[i]->timeStart < stop)||
(conflicts[i]->timeStop > start) && (conflicts[i]->timeStop < stop))
conflictsFound.push_back(conflicts[i]);

View File

@@ -27,7 +27,7 @@
#error "VDR-2.0.0 API version or greater is required!"
#endif
static const char *VERSION = "1.2.17";
static const char *VERSION = "1.3.1";
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
static const char *MAINMENUENTRY = "Tvguide";