diff -Naurb vdr-1.5.8.org/config.c vdr-1.5.8/config.c --- vdr-1.5.8.org/config.c 2009-01-10 13:04:19.858693169 -0500 +++ vdr-1.5.8/config.c 2009-01-10 13:00:51.841655483 -0500 @@ -243,9 +243,14 @@ SVDRPTimeout = 300; ZapTimeout = 3; ChannelEntryTimeout = 1000; + SortSwitchTimersSep = 1; + ConfirmSwitchTimers = 0; + ConfirmSwitchTimersTimeout = 30; + BootForSwitchTimer = 0; PrimaryLimit = 0; DefaultPriority = 50; DefaultLifetime = 99; + DefaultTimerAction = 1; PausePriority = 10; PauseLifetime = 1; UseSubtitle = 1; @@ -423,9 +428,14 @@ else if (!strcasecmp(Name, "SVDRPTimeout")) SVDRPTimeout = atoi(Value); else if (!strcasecmp(Name, "ZapTimeout")) ZapTimeout = atoi(Value); else if (!strcasecmp(Name, "ChannelEntryTimeout")) ChannelEntryTimeout= atoi(Value); + else if (!strcasecmp(Name, "SortSwitchTimersSep")) SortSwitchTimersSep = atoi(Value); + else if (!strcasecmp(Name, "ConfirmSwitchTimers")) ConfirmSwitchTimers= atoi(Value); + else if (!strcasecmp(Name, "ConfirmSwitchTimersTimeout")) ConfirmSwitchTimersTimeout= atoi(Value); + else if (!strcasecmp(Name, "BootForSwitchTimer")) BootForSwitchTimer = atoi(Value); else if (!strcasecmp(Name, "PrimaryLimit")) PrimaryLimit = atoi(Value); else if (!strcasecmp(Name, "DefaultPriority")) DefaultPriority = atoi(Value); else if (!strcasecmp(Name, "DefaultLifetime")) DefaultLifetime = atoi(Value); + else if (!strcasecmp(Name, "DefaultTimerAction")) DefaultTimerAction = atoi(Value); else if (!strcasecmp(Name, "PausePriority")) PausePriority = atoi(Value); else if (!strcasecmp(Name, "PauseLifetime")) PauseLifetime = atoi(Value); else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value); @@ -510,9 +520,14 @@ Store("SVDRPTimeout", SVDRPTimeout); Store("ZapTimeout", ZapTimeout); Store("ChannelEntryTimeout",ChannelEntryTimeout); + Store("SortSwitchTimersSep",SortSwitchTimersSep); + Store("ConfirmSwitchTimers",ConfirmSwitchTimers); + Store("ConfirmSwitchTimersTimeout",ConfirmSwitchTimersTimeout); + Store("BootForSwitchTimer", BootForSwitchTimer); Store("PrimaryLimit", PrimaryLimit); Store("DefaultPriority", DefaultPriority); Store("DefaultLifetime", DefaultLifetime); + Store("DefaultTimerAction", DefaultTimerAction); Store("PausePriority", PausePriority); Store("PauseLifetime", PauseLifetime); Store("UseSubtitle", UseSubtitle); diff -Naurb vdr-1.5.8.org/config.h vdr-1.5.8/config.h --- vdr-1.5.8.org/config.h 2009-01-10 13:04:19.859745569 -0500 +++ vdr-1.5.8/config.h 2009-01-10 13:00:51.842722739 -0500 @@ -229,8 +229,13 @@ int SVDRPTimeout; int ZapTimeout; int ChannelEntryTimeout; + int SortSwitchTimersSep; + int ConfirmSwitchTimers; + int ConfirmSwitchTimersTimeout; + int BootForSwitchTimer; int PrimaryLimit; int DefaultPriority, DefaultLifetime; + int DefaultTimerAction; int PausePriority, PauseLifetime; int UseSubtitle; int UseVps; diff -Naurb vdr-1.5.8.org/menu.c vdr-1.5.8/menu.c --- vdr-1.5.8.org/menu.c 2009-01-10 13:04:19.860752383 -0500 +++ vdr-1.5.8/menu.c 2009-01-10 13:00:51.844720610 -0500 @@ -677,25 +677,32 @@ Setup(); SetFirstDayItem(); } + SetHelp(NULL, tr("Active +/-"), tr("VPS +/-"), tr("Action +/-")); Timers.IncBeingEdited(); } void cMenuEditTimer::Setup() { int current = Current(); + static const char *TimerAction[3]; + TimerAction[SWITCH_ONLY] =tr("switch"); + TimerAction[SWITCH_AND_RECORD]=tr("switch & record"); + TimerAction[RECORD_ONLY] =tr("record"); Clear(); + Add(new cMenuEditBitItem( tr("Active"), &data.flags, tfActive)); Add(new cMenuEditChanItem(tr("Channel"), &channel)); - if (cLiveRecorderControl::GetLiveRecorder(Channels.GetByNumber(channel)) && !timer->Recording()) - { + if (cLiveRecorderControl::GetLiveRecorder(Channels.GetByNumber(channel)) && !timer->Recording()) { Add(new cMenuEditBoolItem(tr("LiveBuffer"), &withBuffer)); } - else + else { withBuffer=true; + } Add(new cMenuEditDateItem(tr("Day"), &data.day, &data.weekdays)); Add(new cMenuEditTimeItem(tr("Start"), &data.start)); Add(new cMenuEditTimeItem(tr("Stop"), &data.stop)); Add(new cMenuEditBitItem( tr("VPS"), &data.flags, tfVps)); + Add(new cMenuEditStraItem(tr("Action"), &data.action, 3, TimerAction)); Add(new cMenuEditIntItem( tr("Priority"), &data.priority, 0, MAXPRIORITY)); Add(new cMenuEditIntItem( tr("Lifetime"), &data.lifetime, 0, MAXLIFETIME)); Add(new cMenuEditStrItem( tr("File"), data.file, sizeof(data.file), tr(FileNameChars))); @@ -752,7 +759,7 @@ isyslog("timer %s %s (%s)", *timer->ToDescr(), addIfConfirmed ? "added" : "modified", timer->HasFlags(tfActive) ? "active" : "inactive"); if (cLiveRecorderControl::GetLiveRecorder(Channels.GetByNumber(channel)) && !timer->Recording() && withBuffer) { - if (data.StartTime() < time(NULL)) + if (data.StartTime() < time(NULL)&&(data.action == RECORD_ONLY)) { cIndexFile *index = new cIndexFile(cLiveRecorderControl::GetLiveRecorder(Channels.GetByNumber(channel))->GetFileName(),false); int now=index->GetLast() - 1; @@ -800,10 +807,57 @@ } } return osBack; - case kRed: + case kRed: return osContinue; case kGreen: case kYellow: - case kBlue: return osContinue; + case kBlue: { + bool hasMargin = data.HasFlags(tfVps) == false; + switch (Key) { + case kGreen: { data.InvFlags(tfActive); break;} + case kYellow: { data.InvFlags(tfVps); break;} + case kBlue: { if (data.action == RECORD_ONLY) + data.action = SWITCH_ONLY; + else + data.action += 1; + break;} + default: break; + } + bool needsMargin = data.HasFlags(tfVps) == false; + if (needsMargin != hasMargin) { + int sta_hh = data.start / 100; + int sta_mm = data.start % 100; + int sto_hh = data.stop / 100; + int sto_mm = data.stop % 100; + + if (needsMargin) { + sto_mm += ::Setup.MarginStop; + sta_mm -= ::Setup.MarginStart; + } else { + sto_mm -= ::Setup.MarginStop; + sta_mm += ::Setup.MarginStart; + } + int daydiff = 0; + while (sta_mm>59) { sta_mm -= 60; sta_hh += 1;} + while (sto_mm>59) { sto_mm -= 60; sto_hh += 1;} + while (sta_hh>23) { sta_hh -= 24; daydiff += 1;} + while (sto_hh>23) { sto_hh -= 24; } + + while (sta_mm<0) { sta_mm += 60; sta_hh -= 1;} + while (sto_mm<0) { sto_mm += 60; sto_hh -= 1;} + while (sta_hh<0) { sta_hh += 24; daydiff -= 1;} + while (sto_hh<0) { sto_hh += 24; } + + if ((daydiff !=0) && (data.day>=0)) { + data.day += daydiff; + if (data.day<=0 ) { data.day += 31; } //MP: todo: this should use some sort of DaysInCurrentMonth function... anyone knows C? + if (data.day>31) { data.day -= 31; } + } + data.start = sta_hh * 100 + sta_mm; + data.stop = sto_hh * 100 + sto_mm; + } + Setup(); + return osContinue; + } default: break; } } @@ -835,6 +889,19 @@ int cMenuTimerItem::Compare(const cListObject &ListObject) const { + if (!Setup.SortSwitchTimersSep) { + return timer->Compare(*((cMenuTimerItem *)&ListObject)->timer); + } + else { + cTimer *ti = ((cMenuTimerItem *)&ListObject)->timer; + if (timer->Action() == ti->Action()) { + return timer->Compare(*ti); + } + else { + if (ti->Action() == RECORD_ONLY) return -1; + else return 1; + } + } return timer->Compare(*((cMenuTimerItem *)&ListObject)->timer); } @@ -856,8 +923,15 @@ day = buffer; } char *buffer = NULL; - asprintf(&buffer, "%c\t%d\t%s%s%s\t%02d:%02d\t%02d:%02d\t%s", + char *symbol1 = NULL; + char *symbol2 = NULL; + + if (timer->HasFlags(tfVps)) asprintf(&symbol2, "%c", 'V'); + else asprintf(&symbol2, "%c", ' '); + + asprintf(&buffer, "%c %s\t%d\t%s%s%s\t%02d:%02d\t%02d:%02d\t%s", !(timer->HasFlags(tfActive)) ? ' ' : timer->FirstDay() ? '!' : timer->Recording() ? '#' : '>', + symbol2, timer->Channel()->Number(), *name, *name && **name ? " " : "", @@ -947,7 +1021,8 @@ }; cMenuTimers::cMenuTimers(void) -:cOsdMenu(tr("Timers"), 3, CHNUMWIDTH, 10, 6, 6) +:cOsdMenu(tr("Timers"), 5, CHNUMWIDTH, 10, 6, 6) + { helpKeys = -1; for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) { @@ -1361,7 +1436,7 @@ cMenuScheduleItem *item = (cMenuScheduleItem *)Get(Current()); if (item) { cChannel *channel = Channels.GetByChannelID(item->event->ChannelID(), true); - if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true)) + if (channel && ( cDevice::PrimaryDevice()->SwitchChannel(channel, true) || (channel->Number() == cDevice::PrimaryDevice()->CurrentChannel()) )) return osEnd; } Skins.Message(mtError, tr("Can't switch channel!")); @@ -1422,7 +1497,14 @@ } } break; - case kBlue: return Switch(); + case kBlue: { + cMenuScheduleItem *item = (cMenuScheduleItem *)Get(Current()); + if (item && item->event->StartTime() <= time(NULL) && item->event->StartTime() + item->event->Duration() > time(NULL)) { + return Switch(); + } else { + return Record(); + } + } case kOk: if (Count()) return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true, true)); break; @@ -1589,7 +1671,7 @@ } if (NewHelpKeys != helpKeys) { const char *Red[] = { NULL, tr("Button$Record"), tr("Button$Timer") }; - SetHelp(Red[NewHelpKeys], tr("Button$Now"), tr("Button$Next")); + SetHelp(Red[NewHelpKeys], tr("Button$Now"), tr("Button$Next"), tr("Button$Switch")); helpKeys = NewHelpKeys; } } @@ -1691,12 +1773,19 @@ } case kYellow: if (schedules) return AddSubMenu(new cMenuWhatsOn(schedules, false, cMenuWhatsOn::CurrentChannel())); - break; - case kBlue: if (Count() && otherChannel) return Switch(); break; + case kBlue: if (Count()) + { + cMenuScheduleItem *item = (cMenuScheduleItem *)Get(Current()); + if (item && item->event->StartTime() <= time(NULL) && item->event->StartTime() + item->event->Duration() > time(NULL)) { + return Switch(); + } else { + return Record(); + } + } case kOk: if (Count()) - return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, otherChannel, true)); + return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true)); break; default: break; } @@ -2365,7 +2454,7 @@ class cMenuSetupOSD : public cMenuSetupBase { private: - const char *useSmallFontTexts[3]; + const char *opts[3]; int osdLanguageIndex; int numSkins; int originalSkinIndex; @@ -2413,9 +2502,13 @@ int current = Current(); for (cSkin *Skin = Skins.First(); Skin; Skin = Skins.Next(Skin)) skinDescriptions[Skin->Index()] = Skin->Description(); + const char *useSmallFontTexts[3]; useSmallFontTexts[0] = tr("never"); useSmallFontTexts[1] = tr("skin dependent"); useSmallFontTexts[2] = tr("always"); + opts[0]=tr("no"); + opts[1]=tr("while replaying"); + opts[2]=tr("yes"); Clear(); SetSection(tr("OSD")); Add(new cMenuEditStraItem(tr("Setup.OSD$Language"), &osdLanguageIndex, I18nNumLanguagesWithLocale(), &I18nLanguages()->At(0))); @@ -2442,6 +2535,10 @@ Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll pages"), &data.MenuScrollPage)); Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll wraps"), &data.MenuScrollWrap)); Add(new cMenuEditBoolItem(tr("Setup.OSD$Menu key closes"), &data.MenuKeyCloses)); + Add(new cMenuEditBoolItem(tr("Setup.OSD$Sort switch timers separately"), &data.SortSwitchTimersSep)); + Add(new cMenuEditStraItem(tr("Setup.OSD$Confirm switch timers"),&data.ConfirmSwitchTimers,3,opts)); + Add(new cMenuEditIntItem(tr("Setup.OSD$Confirm switch timers timeout"),&data.ConfirmSwitchTimersTimeout,1,300)); + Add(new cMenuEditBoolItem(tr("Setup.OSD$Boot on switch timer?"), &data.BootForSwitchTimer)); Add(new cMenuEditBoolItem(tr("Setup.OSD$Recording directories"), &data.RecordingDirs)); SetCurrent(Get(current)); Display(); @@ -2876,6 +2973,11 @@ Add(new cMenuEditIntItem( tr("Setup.Recording$Primary limit"), &data.PrimaryLimit, 0, MAXPRIORITY)); Add(new cMenuEditIntItem( tr("Setup.Recording$Default priority"), &data.DefaultPriority, 0, MAXPRIORITY)); Add(new cMenuEditIntItem( tr("Setup.Recording$Default lifetime (d)"), &data.DefaultLifetime, 0, MAXLIFETIME)); + static const char *TimerAction[3]; + TimerAction[SWITCH_ONLY] =tr("switch"); + TimerAction[SWITCH_AND_RECORD]=tr("switch & record"); + TimerAction[RECORD_ONLY] =tr("record"); + Add(new cMenuEditStraItem(tr("Setup.Recording$Default action"), &data.DefaultTimerAction, 3, TimerAction)); Add(new cMenuEditIntItem( tr("Setup.Recording$Pause priority"), &data.PausePriority, 0, MAXPRIORITY)); Add(new cMenuEditIntItem( tr("Setup.Recording$Pause lifetime (d)"), &data.PauseLifetime, 0, MAXLIFETIME)); Add(new cMenuEditBoolItem(tr("Setup.Recording$Use episode name"), &data.UseSubtitle)); @@ -3553,7 +3655,7 @@ cDisplayChannel *cDisplayChannel::currentDisplayChannel = NULL; -cDisplayChannel::cDisplayChannel(int Number, bool Switched) +cDisplayChannel::cDisplayChannel(int Number, bool Switched, bool InvokedManually) :cOsdObject(true) { if (cControl::Control()) @@ -3563,6 +3665,7 @@ withInfo = !Switched || Setup.ShowInfoOnChSwitch; displayChannel = Skins.Current()->DisplayChannel(withInfo); number = 0; + invokedManually = InvokedManually; timeout = Switched || Setup.TimeoutRequChInfo; channel = Channels.GetByNumber(Number); lastPresent = lastFollowing = NULL; @@ -3582,6 +3685,7 @@ currentDisplayChannel = this; group = -1; number = 0; + invokedManually = false; timeout = true; lastPresent = lastFollowing = NULL; lastTime.Set(); @@ -3792,7 +3896,7 @@ return osEnd; } }; - if (!timeout || lastTime.Elapsed() < (uint64_t)(Setup.ChannelInfoTime * 1000)) { + if (!timeout || lastTime.Elapsed() < (uint64_t)(Setup.ChannelInfoTime * 1000) || (invokedManually)) { if (Key == kNone && !number && group < 0 && !NewChannel && channel && channel->Number() != cDevice::CurrentChannel()) { // makes sure a channel switch through the SVDRP CHAN command is displayed channel = Channels.GetByNumber(cDevice::CurrentChannel()); @@ -4146,7 +4250,7 @@ Timer->SetPending(true); } VideoDiskSpace(&FreeMB); - if (FreeMB < MINFREEDISK) { + if (FreeMB < MINFREEDISK && (Timer->Action() != SWITCH_ONLY)) { if (!Timer || time(NULL) - LastNoDiskSpaceMessage > NODISKSPACEDELTA) { isyslog("not enough disk space to start recording%s%s", Timer ? " timer " : "", Timer ? *Timer->ToDescr() : ""); Skins.Message(mtWarning, tr("Not enough disk space to start recording!")); @@ -4207,8 +4311,29 @@ cChannel *channel = Channels.GetByNumber(ch); if (channel) { + if (Timer && ((Timer->Action() == SWITCH_ONLY)) || (Timer->Action() == SWITCH_AND_RECORD)) { + char *buffer = NULL; + asprintf(&buffer, tr("Switch to \"%s\" (%s)?"), Timer->File(), Timer->Channel()->Name()); + if (Timer->Action() == SWITCH_ONLY) { + Timer->Skip(); + cRecordControls::Process(time(NULL)); + if (Timer->IsSingleEvent()) Timers.Del(Timer); + Timers.Save(); + } + if ( Setup.ConfirmSwitchTimers == 0 || + ( (Setup.ConfirmSwitchTimers == 2) && (Interface->Confirm(buffer, Setup.ConfirmSwitchTimersTimeout)) ) || + ( (Setup.ConfirmSwitchTimers == 1) && ((cDevice::PrimaryDevice()->Replaying() == false) || + (Interface->Confirm(buffer, Setup.ConfirmSwitchTimersTimeout))) ) ) { + cDevice::PrimaryDevice()->SwitchChannel(channel, true); + } + if (Timer->Action() == SWITCH_ONLY) { + free(buffer); + return false; + } + } int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority; cDevice *device = cDevice::GetDevice(channel, Priority, false); + if (!device && cControl::Control()->IsLiveRecording()) device = cDevice::ActualDevice(); if (device) { dsyslog("switching device %d to channel %d", device->DeviceNumber() + 1, channel->Number()); if (!device->SwitchChannel(channel, false)) { diff -Naurb vdr-1.5.8.org/menu.h vdr-1.5.8/menu.h --- vdr-1.5.8.org/menu.h 2009-01-10 13:02:47.463745296 -0500 +++ vdr-1.5.8/menu.h 2009-01-10 13:00:51.844720610 -0500 @@ -47,6 +47,7 @@ cMenuEditTimer(cTimer *Timer, bool New = false); virtual ~cMenuEditTimer(); virtual eOSState ProcessKey(eKeys Key); + static const char * TimerActiveStates[]; }; class cMenuEvent : public cOsdMenu { @@ -86,6 +87,7 @@ bool withInfo; cTimeMs lastTime; int number; + bool invokedManually; bool timeout; cChannel *channel; const cEvent *lastPresent; @@ -96,7 +98,7 @@ void Refresh(void); cChannel *NextAvailableChannel(cChannel *Channel, int Direction); public: - cDisplayChannel(int Number, bool Switched); + cDisplayChannel(int Number, bool Switched, bool InvokedManually); cDisplayChannel(eKeys FirstKey); virtual ~cDisplayChannel(); virtual eOSState ProcessKey(eKeys Key); diff -Naurb vdr-1.5.8.org/timers.c vdr-1.5.8/timers.c --- vdr-1.5.8.org/timers.c 2007-08-04 05:23:33.000000000 -0400 +++ vdr-1.5.8/timers.c 2009-01-10 13:00:51.844720610 -0500 @@ -27,8 +27,13 @@ lastSetEvent = 0; recording = pending = inVpsMargin = false; flags = tfNone; - if (Instant) + if (Instant) { SetFlags(tfActive | tfInstant); + action = RECORD_ONLY; + } + else { + action = Setup.DefaultTimerAction; + } channel = Channel ? Channel : Channels.GetByNumber(cDevice::CurrentChannel()); time_t t = time(NULL); struct tm tm_r; @@ -75,6 +80,7 @@ stop -= 2400; priority = Setup.DefaultPriority; lifetime = Setup.DefaultLifetime; + action = Setup.DefaultTimerAction; *file = 0; const char *Title = Event->Title(); if (!isempty(Title)) @@ -113,6 +119,7 @@ stop = Timer.stop; priority = Timer.priority; lifetime = Timer.lifetime; + action = Timer.action; strncpy(file, Timer.file, sizeof(file)); free(aux); aux = Timer.aux ? strdup(Timer.aux) : NULL; @@ -136,7 +143,7 @@ { char *buffer; strreplace(file, ':', '|'); - asprintf(&buffer, "%u:%s:%s:%04d:%04d:%d:%d:%s:%s\n", flags, UseChannelID ? *Channel()->GetChannelID().ToString() : *itoa(Channel()->Number()), *PrintDay(day, weekdays, true), start, stop, priority, lifetime, file, aux ? aux : ""); + asprintf(&buffer, "%u:%s:%s:%04d:%04d:%d:%d:%d:%s:%s\n", flags, UseChannelID ? *Channel()->GetChannelID().ToString() : *itoa(Channel()->Number()), *PrintDay(day, weekdays, true), start, stop, priority, lifetime, action, file, aux ? aux : ""); strreplace(file, '|', ':'); return cString(buffer, true); } @@ -279,7 +286,7 @@ s = s2; } bool result = false; - if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &aux)) { + if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &action, &filebuffer, &aux)) { ClrFlags(tfRecording); if (aux && !*skipspace(aux)) { free(aux); @@ -670,12 +677,12 @@ return t; } -cTimer *cTimers::GetNextActiveTimer(void) +cTimer *cTimers::GetNextActiveTimer(bool jumpOverSwitchTimer) { cTimer *t0 = NULL; for (cTimer *ti = First(); ti; ti = Next(ti)) { ti->Matches(); - if ((ti->HasFlags(tfActive)) && (!t0 || ti->StopTime() > time(NULL) && ti->Compare(*t0) < 0)) + if ((ti->HasFlags(tfActive)) && (!t0 || ti->Compare(*t0) < 0) && (!jumpOverSwitchTimer || Setup.BootForSwitchTimer || (ti->Action() != SWITCH_ONLY)) ) t0 = ti; } return t0; diff -Naurb vdr-1.5.8.org/timers.h vdr-1.5.8/timers.h --- vdr-1.5.8.org/timers.h 2009-01-10 13:01:55.050619754 -0500 +++ vdr-1.5.8/timers.h 2009-01-10 13:00:51.845676394 -0500 @@ -15,6 +15,10 @@ #include "epg.h" #include "tools.h" +#define SWITCH_ONLY 0 // switch only timer type +#define SWITCH_AND_RECORD 1 // switch and record timer type +#define RECORD_ONLY 2 // record only timer type + enum eTimerFlags { tfNone = 0x0000, tfActive = 0x0001, tfInstant = 0x0002, @@ -40,6 +44,7 @@ int stop; int priority; int lifetime; + int action; char file[MaxFileName]; char *aux; const cEvent *event; @@ -61,6 +66,7 @@ int Stop(void) const { return stop; } int Priority(void) const { return priority; } int Lifetime(void) const { return lifetime; } + int Action(void) const { return action; } const char *File(void) const { return file; } time_t FirstDay(void) const { return weekdays ? day : 0; } const char *Aux(void) const { return aux; } @@ -110,7 +116,7 @@ cTimer *GetTimer(cTimer *Timer); cTimer *GetMatch(time_t t); cTimer *GetMatch(const cEvent *Event, int *Match = NULL); - cTimer *GetNextActiveTimer(void); + cTimer *GetNextActiveTimer(bool jumpOverSwitchTimer = false); int BeingEdited(void) { return beingEdited; } void IncBeingEdited(void) { beingEdited++; } void DecBeingEdited(void) { if (!--beingEdited) lastSetEvents = 0; } diff -Naurb vdr-1.5.8.org/vdr.c vdr-1.5.8/vdr.c --- vdr-1.5.8.org/vdr.c 2009-01-10 13:05:08.498745564 -0500 +++ vdr-1.5.8/vdr.c 2009-01-10 13:00:51.845676394 -0500 @@ -779,7 +779,7 @@ // Channel display: if (!EITScanner.Active() && cDevice::CurrentChannel() != LastChannel) { if (!Menu) - Menu = new cDisplayChannel(cDevice::CurrentChannel(), LastChannel >= 0); + Menu = new cDisplayChannel(cDevice::CurrentChannel(), LastChannel >= 0, LastChannel == -2); LastChannel = cDevice::CurrentChannel(); LastChannelChanged = Now; }