summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Reimer2018-12-25 16:34:47 +0100
committerManuel Reimer2018-12-25 16:34:47 +0100
commit83755f4dc8f79b4d4a8ec3acce4c5e6debec10ba (patch)
treed0f9e3670429bc96aa90debdcad15e548d8af5ec
parent60a7d403cfccdbd3c525ceecc49745e5874bc408 (diff)
downloadaur-83755f4dc8f79b4d4a8ec3acce4c5e6debec10ba.tar.gz
Sync from VDR4Arch (https://github.com/VDR4Arch/vdr4arch/commit/65b51e679ac5783c5025e41adf1a8f5543a1a5fe)
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD17
-rw-r--r--vdr-2.3.1-tvguide.diff1228
-rw-r--r--vdr-2.3.5-tvguide.diff154
-rw-r--r--vdr-2.3.7-tvguide.diff14
5 files changed, 1421 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d3021288ca3d..b288a1641516 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by makepkg 5.1.1
+# Tue Dec 25 15:34:46 UTC 2018
pkgbase = vdr-tvguide
pkgdesc = highly customizable 2D EPG viewer plugin.
pkgver = 1.2.2
- pkgrel = 10
+ pkgrel = 12
epoch = 1
url = http://projects.vdr-developer.org/projects/plg-tvguide
arch = x86_64
@@ -13,11 +15,17 @@ pkgbase = vdr-tvguide
makedepends = git
depends = graphicsmagick
depends = libpng
- depends = vdr-api=2.2.0
+ depends = vdr-api=2.4.0
backup = etc/vdr/conf.avail/50-tvguide.conf
source = http://projects.vdr-developer.org/attachments/download/1701/vdr-tvguide-1.2.2.tgz
+ source = vdr-2.3.1-tvguide.diff
+ source = vdr-2.3.5-tvguide.diff
+ source = vdr-2.3.7-tvguide.diff
source = 50-tvguide.conf
md5sums = 1e811e1a99f68afd8f85f56fd416a0f1
+ md5sums = 6305ab08f42943032d5d97ab187534ec
+ md5sums = 6064290c6a522c441aa8a13d3a19d18f
+ md5sums = 62533445bfdd384d1bd09c4ffb451682
md5sums = 3caf2313b8794eaa525af664a7208b7a
pkgname = vdr-tvguide
diff --git a/PKGBUILD b/PKGBUILD
index ee616f28cf38..a257c0731856 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,8 +4,8 @@
pkgname=vdr-tvguide
pkgver=1.2.2
epoch=1
-_vdrapi=2.2.0
-pkgrel=10
+_vdrapi=2.4.0
+pkgrel=12
pkgdesc="highly customizable 2D EPG viewer plugin."
url="http://projects.vdr-developer.org/projects/plg-tvguide"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
@@ -14,11 +14,24 @@ depends=('graphicsmagick' 'libpng' "vdr-api=$_vdrapi")
makedepends=('git')
_plugname=${pkgname//vdr-/}
source=("http://projects.vdr-developer.org/attachments/download/1701/$pkgname-$pkgver.tgz"
+ "vdr-2.3.1-tvguide.diff"
+ "vdr-2.3.5-tvguide.diff"
+ "vdr-2.3.7-tvguide.diff"
"50-$_plugname.conf")
backup=("etc/vdr/conf.avail/50-$_plugname.conf")
md5sums=('1e811e1a99f68afd8f85f56fd416a0f1'
+ '6305ab08f42943032d5d97ab187534ec'
+ '6064290c6a522c441aa8a13d3a19d18f'
+ '62533445bfdd384d1bd09c4ffb451682'
'3caf2313b8794eaa525af664a7208b7a')
+prepare() {
+ cd "$srcdir/$_plugname-$pkgver"
+ patch -i "${srcdir}/vdr-2.3.1-tvguide.diff"
+ patch -i "${srcdir}/vdr-2.3.5-tvguide.diff"
+ patch -i "${srcdir}/vdr-2.3.7-tvguide.diff"
+}
+
build() {
cd "$srcdir/$_plugname-$pkgver"
make IMAGELIB=graphicsmagick
diff --git a/vdr-2.3.1-tvguide.diff b/vdr-2.3.1-tvguide.diff
new file mode 100644
index 000000000000..bed5e5cb8cc8
--- /dev/null
+++ b/vdr-2.3.1-tvguide.diff
@@ -0,0 +1,1228 @@
+Index: b/channelcolumn.c
+===================================================================
+--- a/channelcolumn.c
++++ b/channelcolumn.c
+@@ -5,9 +5,15 @@
+ this->channel = channel;
+ this->num = num;
+ this->myTime = myTime;
++#if VDRVERSNUM > 20300
++ setTimer();
++#else
+ hasTimer = channel->HasTimer();
++#endif
+ hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
++#if VDRVERSNUM < 20300
+ schedulesLock = new cSchedulesLock(false, 100);
++#endif
+ header = NULL;
+ }
+
+@@ -15,7 +21,9 @@
+ if (header)
+ delete header;
+ grids.Clear();
++#if VDRVERSNUM < 20300
+ delete schedulesLock;
++#endif
+ }
+
+ void cChannelColumn::clearGrids() {
+@@ -33,7 +41,12 @@
+ }
+
+ bool cChannelColumn::readGrids() {
++#if VDRVERSNUM > 20300
++ LOCK_SCHEDULES_READ;
++ schedules = Schedules;
++#else
+ schedules = cSchedules::Schedules(*schedulesLock);
++#endif
+ const cSchedule *Schedule = NULL;
+ Schedule = schedules->GetSchedule(channel);
+ if (!Schedule) {
+@@ -186,7 +199,12 @@
+ return;
+ }
+ //if not, i have to add new ones to the list
++#if VDRVERSNUM > 2030
++ LOCK_SCHEDULES_READ;
++ schedules = Schedules;
++#else
+ schedules = cSchedules::Schedules(*schedulesLock);
++#endif
+ const cSchedule *Schedule = NULL;
+ Schedule = schedules->GetSchedule(channel);
+ if (!Schedule) {
+@@ -234,7 +252,12 @@
+ return;
+ }
+ //if not, i have to add new ones to the list
++#if VDRVERSNUM > 2030
++ LOCK_SCHEDULES_READ;
++ schedules = Schedules;
++#else
+ schedules = cSchedules::Schedules(*schedulesLock);
++#endif
+ const cSchedule *Schedule = NULL;
+ Schedule = schedules->GetSchedule(channel);
+ if (!Schedule) {
+@@ -319,6 +342,15 @@
+ }
+ }
+
++#if VDRVERSNUM > 20300
++void cChannelColumn::setTimer() {
++ hasTimer = false;
++ LOCK_TIMERS_READ;
++ if (Timers->UsesChannel(channel))
++ hasTimer = true;
++}
++
++#endif
+ cGrid *cChannelColumn::addEpgGrid(const cEvent *event, cGrid *firstGrid, bool color) {
+ cGrid *grid = new cEpgGrid(this, event);
+ grid->setText();
+@@ -342,7 +374,11 @@
+ }
+
+ void cChannelColumn::SetTimers() {
++#if VDRVERSNUM > 20300
++ setTimer();
++#else
+ hasTimer = channel->HasTimer();
++#endif
+ hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);
+ for (cGrid *grid = grids.First(); grid; grid = grids.Next(grid)) {
+ bool gridHadTimer = grid->HasTimer();
+@@ -364,4 +400,4 @@
+ esyslog("tvguide: grid %d: start: %s, stop: %s", i, *cMyTime::printTime(grid->StartTime()), *cMyTime::printTime(grid->EndTime()));
+ i++;
+ }
+-}
+\ No newline at end of file
++}
+Index: b/channelcolumn.h
+===================================================================
+--- a/channelcolumn.h
++++ b/channelcolumn.h
+@@ -50,7 +50,11 @@
+ void ClearOutdatedEnd();
+ int GetNum() {return num;};
+ void SetNum(int num) {this->num = num;};
++#if VDRVERSNUM > 20300
++ void setTimer();
++#else
+ void setTimer() {hasTimer = channel->HasTimer();};
++#endif
+ bool HasTimer() { return hasTimer; };
+ void setSwitchTimer() {hasSwitchTimer = SwitchTimers.ChannelInSwitchList(channel);};
+ bool HasSwitchTimer() { return hasSwitchTimer; };
+Index: b/channelgroups.c
+===================================================================
+--- a/channelgroups.c
++++ b/channelgroups.c
+@@ -10,12 +10,21 @@
+ void cChannelGroups::ReadChannelGroups(void) {
+ bool setStart = false;
+ int lastChannelNumber = 0;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ const cChannel *first = Channels->First();
++#else
+ const cChannel *first = Channels.First();
++#endif
+ if (!first->GroupSep()) {
+ channelGroups.push_back(cChannelGroup(tr("Main Program")));
+ setStart = true;
+ }
++#if VDRVERSNUM > 20300
++ for (const cChannel *channel = Channels->First(); channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
++#endif
+ if (setStart && (channelGroups.size() > 0)) {
+ channelGroups[channelGroups.size()-1].SetChannelStart(channel->Number());
+ setStart = false;
+@@ -103,7 +112,12 @@
+ int groupLast = group;
+ int line = 0;
+ int lineStart = 0;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ for (const cChannel *channel = Channels->Next(start); channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = Channels.Next(start); channel; channel = Channels.Next(channel)) {
++#endif
+ if (channel->GroupSep())
+ continue;
+ group = GetGroup(channel);
+Index: b/channeljump.c
+===================================================================
+--- a/channeljump.c
++++ b/channeljump.c
+@@ -11,7 +11,12 @@
+ pixmapText = NULL;
+ channel = 0;
+ if (!tvguideConfig.hideLastGroup) {
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ maxChannels = Channels->MaxNumber();
++#else
+ maxChannels = Channels.MaxNumber();
++#endif
+ } else {
+ maxChannels = channelGroups->GetLastValidChannel();
+ }
+@@ -87,4 +92,4 @@
+ if ((cTimeMs::Now() - startTime) > timeout)
+ return true;
+ return false;
+- }
+\ No newline at end of file
++ }
+Index: b/detailview.c
+===================================================================
+--- a/detailview.c
++++ b/detailview.c
+@@ -9,7 +9,12 @@
+ Cancel(-1);
+ while (Active())
+ cCondWait::SleepMs(10);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ footer->LeaveDetailedViewMode(Channels->GetByChannelID(event->ChannelID()));
++#else
+ footer->LeaveDetailedViewMode(Channels.GetByChannelID(event->ChannelID()));
++#endif
+ if (view)
+ delete view;
+ }
+@@ -42,7 +47,12 @@
+ dateTime = cString::sprintf("%s %s - %s (%d %s)", *event->GetDateString(), *event->GetTimeString(), *event->GetEndTimeString(), event->Duration()/60, tr("min"));
+ }
+ view->SetDateTime(*dateTime);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ view->SetChannel(Channels->GetByChannelID(event->ChannelID(), true));
++#else
+ view->SetChannel(Channels.GetByChannelID(event->ChannelID(), true));
++#endif
+ view->SetEventID(event->EventID());
+ view->SetEvent(event);
+ }
+@@ -90,7 +100,12 @@
+ continue;
+ i++;
+ sstrReruns << *DayDateTime(r->event->StartTime());
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cChannel *channel = (cChannel *)Channels->GetByChannelID(r->event->ChannelID(), true, true);
++#else
+ cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true);
++#endif
+ if (channel) {
+ sstrReruns << ", " << trVDR("Channel") << " " << channel->Number() << ":";
+ sstrReruns << " " << channel->ShortName(true);
+@@ -156,4 +171,4 @@
+ break;
+ }
+ return state;
+-}
+\ No newline at end of file
++}
+Index: b/imagecache.c
+===================================================================
+--- a/imagecache.c
++++ b/imagecache.c
+@@ -280,7 +280,12 @@
+ return;
+ if (tvguideConfig.numLogosInitial > 0) {
+ int channelsCached = 0;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ for (const cChannel *channel = Channels->First(); channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
++#endif
+ if (channelsCached >= tvguideConfig.numLogosInitial)
+ break;
+ if (!channel->GroupSep()) {
+Index: b/recmanager.c
+===================================================================
+--- a/recmanager.c
++++ b/recmanager.c
+@@ -62,8 +62,14 @@
+ rtMatch.event = event;
+ pRemoteTimers->Service("RemoteTimers::GetMatch-v1.0", &rtMatch);
+ timer = rtMatch.timer;
+- } else
++ } else {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ timer = (cTimer*) Timers->GetMatch(event);
++#else
+ timer = Timers.GetMatch(event);
++#endif
++ }
+ return timer;
+ }
+
+@@ -79,19 +85,35 @@
+
+ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
+ cTimer *timer = new cTimer(event);
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_WRITE;
++ cTimer *t = Timers->GetTimer(timer);
++#else
+ cTimer *t = Timers.GetTimer(timer);
++#endif
+ if (t) {
+ t->OnOff();
++#if VDRVERSNUM > 20300
++ LOCK_SCHEDULES_READ;
++ t->SetEventFromSchedule(Schedules);
++#else
+ t->SetEventFromSchedule();
++#endif
+ delete timer;
+ timer = t;
+ isyslog("timer %s reactivated", *t->ToDescr());
+ } else {
++#if VDRVERSNUM > 20300
++ Timers->Add(timer);
++#else
+ Timers.Add(timer);
++#endif
+ isyslog("timer %s added (active)", *timer->ToDescr());
+ }
+ SetTimerPath(timer, event, path);
++#if VDRVERSNUM < 20300
+ Timers.SetModified();
++#endif
+ return timer;
+ }
+
+@@ -148,7 +170,12 @@
+ }
+
+ void cRecManager::DeleteTimer(int timerID) {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *t = (cTimer *)Timers->Get(timerID);
++#else
+ cTimer *t = Timers.Get(timerID);
++#endif
+ if (!t)
+ return;
+ DeleteTimer(t);
+@@ -165,7 +192,12 @@
+ }
+
+ void cRecManager::DeleteLocalTimer(const cEvent *event) {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *t = (cTimer *)Timers->GetMatch(event);
++#else
+ cTimer *t = Timers.GetMatch(event);
++#endif
+ if (!t)
+ return;
+ DeleteTimer(t);
+@@ -173,13 +205,24 @@
+
+
+ void cRecManager::DeleteTimer(cTimer *timer) {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_WRITE;
++#endif
+ if (timer->Recording()) {
+ timer->Skip();
++#if VDRVERSNUM > 20300
++ cRecordControls::Process(Timers,time(NULL));
++#else
+ cRecordControls::Process(time(NULL));
++#endif
+ }
+ isyslog("timer %s deleted", *timer->ToDescr());
++#if VDRVERSNUM > 20300
++ Timers->Del(timer, true);
++#else
+ Timers.Del(timer, true);
+ Timers.SetModified();
++#endif
+ }
+
+ void cRecManager::DeleteRemoteTimer(const cEvent *event) {
+@@ -220,21 +263,33 @@
+ else if (!timer->HasFlags(tfActive) && active)
+ timer->SetFlags(tfActive);
+
++#if VDRVERSNUM > 20300
++ LOCK_SCHEDULES_READ;
++ timer->SetEventFromSchedule(Schedules);
++#else
+ timer->SetEventFromSchedule();
++#endif
+ if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ RemoteTimers_Timer_v1_0 rt;
+ rt.timer = timer;
+ if (!pRemoteTimers->Service("RemoteTimers::ModTimer-v1.0", &rt))
+ rt.timer = NULL;
+ RefreshRemoteTimers();
++#if VDRVERSNUM < 20300
+ } else {
+- Timers.SetModified();
++ Timers.SetModified(); // what to do JF ???
++#endif
+ }
+ }
+
+
+ bool cRecManager::IsRecorded(const cEvent *event) {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *timer = (cTimer *)Timers->GetMatch(event);
++#else
+ cTimer *timer = Timers.GetMatch(event);
++#endif
+ if (!timer)
+ return false;
+ return timer->Recording();
+@@ -260,7 +315,12 @@
+ }
+
+ void cRecManager::CreateSeriesTimer(cTimer *seriesTimer) {
++#if VDRVERSNUM > 20300
++ LOCK_SCHEDULES_READ;
++ seriesTimer->SetEventFromSchedule(Schedules);
++#else
+ seriesTimer->SetEventFromSchedule();
++#endif
+ if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+ RemoteTimers_Timer_v1_0 rt;
+ rt.timer = seriesTimer;
+@@ -268,8 +328,13 @@
+ isyslog("%s", *rt.errorMsg);
+ RefreshRemoteTimers();
+ } else {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_WRITE;
++ Timers->Add(seriesTimer);
++#else
+ Timers.Add(seriesTimer);
+ Timers.SetModified();
++#endif
+ }
+ }
+
+@@ -316,9 +381,15 @@
+ numResults = results.size();
+ if (numResults > 0) {
+ searchResults = new const cEvent *[numResults];
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ LOCK_SCHEDULES_READ;
++ const cSchedules *schedules = Schedules;
++#else
+ cSchedulesLock schedulesLock;
+ const cSchedules *schedules;
+ schedules = cSchedules::Schedules(schedulesLock);
++#endif
+ const cEvent *event = NULL;
+ int index=0;
+ for (std::list<std::string>::iterator it=results.begin(); it != results.end(); ++it) {
+@@ -328,7 +399,11 @@
+ int eventID = atoi(flds[1].c_str());
+ std::string channelID = flds[7];
+ tChannelID chanID = tChannelID::FromString(channelID.c_str());
++#if VDRVERSNUM > 20300
++ cChannel *channel = (cChannel *)Channels->GetByChannelID(chanID);
++#else
+ cChannel *channel = Channels.GetByChannelID(chanID);
++#endif
+ if (channel) {
+ const cSchedule *Schedule = NULL;
+ Schedule = schedules->GetSchedule(channel);
+@@ -435,24 +510,45 @@
+ return;
+ int searchTimerID = searchTimer->GetID();
+ if (delTimers) {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *timer = (cTimer *)Timers->First();
++#else
+ cTimer *timer = Timers.First();
++#endif
+ while(timer) {
+ if (!timer->Recording()) {
+ char* searchID = GetAuxValue(timer, "s-id");
+ if (searchID) {
+ if (searchTimerID == atoi(searchID)) {
++#if VDRVERSNUM > 20300
++ cTimer* timerNext = (cTimer *)Timers->Next(timer);
++#else
+ cTimer* timerNext = Timers.Next(timer);
++#endif
+ DeleteTimer(timer);
+ timer = timerNext;
+ } else {
++#if VDRVERSNUM > 20300
++ timer = (cTimer *)Timers->Next(timer);
++#else
+ timer = Timers.Next(timer);
++#endif
+ }
+ free(searchID);
+ } else {
++#if VDRVERSNUM > 20300
++ timer = (cTimer *)Timers->Next(timer);
++#else
+ timer = Timers.Next(timer);
++#endif
+ }
+ } else {
++#if VDRVERSNUM > 20300
++ timer = (cTimer *)Timers->Next(timer);
++#else
+ timer = Timers.Next(timer);
++#endif
+ }
+ }
+ }
+@@ -511,7 +607,12 @@
+ int num = 0;
+ numResults = 0;
+
++#if VDRVERSNUM > 20300
++ LOCK_RECORDINGS_READ;
++ for (cRecording *recording = (cRecording *)Recordings->First(); recording; recording = (cRecording *)Recordings->Next(recording)) {
++#else
+ for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {
++#endif
+ std::string s1 = recording->Name();
+ std::string s2 = searchString;
+ if (s1.empty() || s2.empty()) continue;
+@@ -619,17 +720,37 @@
+
+ const cEvent **cRecManager::WhatsOnNow(bool nowOrNext, int &numResults) {
+ std::vector<const cEvent*> tmpResults;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ LOCK_SCHEDULES_READ;
++ const cSchedules *schedules = Schedules;
++#else
+ cSchedulesLock schedulesLock;
+ const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
++#endif
+ const cChannel *startChannel = NULL, *stopChannel = NULL;
+ if (tvguideConfig.favLimitChannels) {
++#if VDRVERSNUM > 20300
++ startChannel = Channels->GetByNumber(tvguideConfig.favStartChannel);
++ stopChannel = Channels->GetByNumber(tvguideConfig.favStopChannel);
++#else
+ startChannel = Channels.GetByNumber(tvguideConfig.favStartChannel);
+ stopChannel = Channels.GetByNumber(tvguideConfig.favStopChannel);
++#endif
+ }
+- if (!startChannel)
++ if (!startChannel) {
++#if VDRVERSNUM > 20300
++ startChannel = Channels->First();
++#else
+ startChannel = Channels.First();
++#endif
++ }
+
++#if VDRVERSNUM > 20300
++ for (const cChannel *channel = startChannel; channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = startChannel; channel; channel = Channels.Next(channel)) {
++#endif
+ if (channel->GroupSep()) continue;
+ const cSchedule *Schedule = schedules->GetSchedule(channel);
+ if (!Schedule) continue;
+@@ -679,17 +800,37 @@
+ if (searchTime < now)
+ searchTime += 24*60*60;
+
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ LOCK_SCHEDULES_READ;
++ const cSchedules *schedules = Schedules;
++#else
+ cSchedulesLock schedulesLock;
+ const cSchedules *schedules = cSchedules::Schedules(schedulesLock);
++#endif
+ const cChannel *startChannel = NULL, *stopChannel = NULL;
+ if (tvguideConfig.favLimitChannels) {
++#if VDRVERSNUM > 20300
++ startChannel = Channels->GetByNumber(tvguideConfig.favStartChannel);
++ stopChannel = Channels->GetByNumber(tvguideConfig.favStopChannel);
++#else
+ startChannel = Channels.GetByNumber(tvguideConfig.favStartChannel);
+ stopChannel = Channels.GetByNumber(tvguideConfig.favStopChannel);
++#endif
+ }
+- if (!startChannel)
++ if (!startChannel) {
++#if VDRVERSNUM > 20300
++ startChannel = Channels->First();
++#else
+ startChannel = Channels.First();
++#endif
++ }
+
++#if VDRVERSNUM > 20300
++ for (const cChannel *channel = startChannel; channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = startChannel; channel; channel = Channels.Next(channel)) {
++#endif
+ if (channel->GroupSep()) continue;
+ const cSchedule *Schedule = schedules->GetSchedule(channel);
+ if (!Schedule) continue;
+Index: b/recmenuitem.c
+===================================================================
+--- a/recmenuitem.c
++++ b/recmenuitem.c
+@@ -1817,7 +1817,12 @@
+ if (!event)
+ return;
+ int logoX = DrawIcons();
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ const cChannel *channel = Channels->GetByChannelID(event->ChannelID());
++#else
+ const cChannel *channel = Channels.GetByChannelID(event->ChannelID());
++#endif
+ cString channelName = "";
+ if (channel)
+ channelName = channel->Name();
+@@ -1999,14 +2004,26 @@
+ if (!channel)
+ return rmsConsumed;
+ cChannel *prev = channel;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ const cChannel *firstChannel = Channels->First();
++ if(firstChannel->GroupSep())
++ firstChannel = Channels->Next(firstChannel);
++#else
+ cChannel *firstChannel = Channels.First();
+ if(firstChannel->GroupSep())
+ firstChannel = Channels.Next(firstChannel);
++#endif
+ if (prev == firstChannel) {
+ if (!initialChannelSet)
+ channel = NULL;
+ } else {
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ while (prev = (cChannel *)Channels->Prev(prev)) {
++#else
+ while (prev = Channels.Prev(prev)) {
++#endif
+ if(!prev->GroupSep()) {
+ channel = prev;
+ break;
+@@ -2025,12 +2042,24 @@
+ case kRight: {
+ fresh = true;
+ if (!channel) {
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ channel = (cChannel *)Channels->First();
++ if(channel->GroupSep())
++ channel = (cChannel *)Channels->Next(channel);
++#else
+ channel = Channels.First();
+ if(channel->GroupSep())
+ channel = Channels.Next(channel);
++#endif
+ } else {
+ cChannel *next = channel;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ while (next = (cChannel *)Channels->Next(next)) {
++#else
+ while (next = Channels.Next(next)) {
++#endif
+ if(!next->GroupSep()) {
+ channel = next;
+ break;
+@@ -2052,7 +2081,12 @@
+ fresh = false;
+ }
+ channelNumber = channelNumber * 10 + (Key - k0);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cChannel *chanNew = (cChannel *)Channels->GetByNumber(channelNumber);
++#else
+ cChannel *chanNew = Channels.GetByNumber(channelNumber);
++#endif
+ if (chanNew) {
+ channel = chanNew;
+ DrawValue();
+@@ -2242,7 +2276,12 @@
+ if (!recording)
+ return;
+ const cRecordingInfo *recInfo = recording->Info();
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cChannel *channel = (cChannel *)Channels->GetByChannelID(recInfo->ChannelID());
++#else
+ cChannel *channel = Channels.GetByChannelID(recInfo->ChannelID());
++#endif
+ cString channelName = tr("unknown channel");
+ if (channel)
+ channelName = channel->Name();
+@@ -2899,4 +2938,4 @@
+ break;
+ }
+ return rmsNotConsumed;
+-}
+\ No newline at end of file
++}
+Index: b/recmenumanager.c
+===================================================================
+--- a/recmenumanager.c
++++ b/recmenumanager.c
+@@ -125,7 +125,12 @@
+ timerIndex = menu->GetTimerConflictIndex();
+ } else break;
+ int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *t = (cTimer *)Timers->Get(timerID);
++#else
+ cTimer *t = Timers.Get(timerID);
++#endif
+ if (t) {
+ const cEvent *ev = t->Event();
+ if (ev) {
+@@ -156,7 +161,12 @@
+ timerIndex = menu->GetTimerConflictIndex();
+ } else break;
+ int timerID = timerConflicts->GetCurrentConflictTimerID(timerIndex);
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *timer = (cTimer *)Timers->Get(timerID);
++#else
+ cTimer *timer = Timers.Get(timerID);
++#endif
+ if (timer) {
+ delete activeMenu;
+ activeMenu = new cRecMenuEditTimer(timer, rmsSaveTimerConflictMenu);
+@@ -230,7 +240,12 @@
+ recFolder = menu->GetFolder();
+ }
+ delete activeMenu;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cChannel *channel = (cChannel *)Channels->GetByChannelID(event->ChannelID());
++#else
+ cChannel *channel = Channels.GetByChannelID(event->ChannelID());
++#endif
+ activeMenu = new cRecMenuSeriesTimer(channel, event, recFolder);
+ activeMenu->Display();
+ break; }
+@@ -606,7 +621,12 @@
+ timerConflict = menu->GetTimerConflictIndex();
+ } else break;
+ int timerID = timerConflicts->GetCurrentConflictTimerID(timerConflict);
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *timer = (cTimer *)Timers->Get(timerID);
++#else
+ cTimer *timer = Timers.Get(timerID);
++#endif
+ if (timer) {
+ const cEvent *event = timer->Event();
+ if (event) {
+@@ -648,7 +668,12 @@
+ originalConflictIndex = menu->GetTimerConflictIndex();
+ } else break;
+ int originalTimerID = timerConflicts->GetCurrentConflictTimerID(originalConflictIndex);
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ cTimer *timerOriginal = (cTimer *)Timers->Get(originalTimerID);
++#else
+ cTimer *timerOriginal = Timers.Get(originalTimerID);
++#endif
+ if (replace && timerOriginal) {
+ recManager->DeleteTimer(timerOriginal->Event());
+ recManager->createTimer(replace);
+@@ -820,7 +845,12 @@
+
+ bool cRecMenuManager::DisplayTimerConflict(cTimer *timer) {
+ int timerID = 0;
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ for (cTimer *t = (cTimer *)Timers->First(); t; t = (cTimer *)Timers->Next(t)) {
++#else
+ for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
++#endif
+ if (t == timer)
+ return DisplayTimerConflict(timerID);
+ timerID++;
+@@ -890,4 +920,4 @@
+ }
+ osdManager.flush();
+ return state;
+-}
+\ No newline at end of file
++}
+Index: b/recmenus.c
+===================================================================
+--- a/recmenus.c
++++ b/recmenus.c
+@@ -105,7 +105,12 @@
+ // --- cRecMenuConfirmTimer ---------------------------------------------------------
+ cRecMenuConfirmTimer::cRecMenuConfirmTimer(const cEvent *event) {
+ SetWidthPercent(50);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
++#else
+ cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
++#endif
+ cString message;
+ bool eventHasTimer = false;
+ if (tvguideConfig.useRemoteTimers && pRemoteTimers) {
+@@ -143,7 +148,12 @@
+ // --- cRecMenuConfirmDeleteTimer ---------------------------------------------------------
+ cRecMenuConfirmDeleteTimer::cRecMenuConfirmDeleteTimer(const cEvent *event) {
+ SetWidthPercent(50);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
++#else
+ cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
++#endif
+ cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
+ tr("Timer deleted"),
+ *channelName,
+@@ -165,7 +175,12 @@
+ // --- cRecMenuAskDeleteTimer ---------------------------------------------------------
+ cRecMenuAskDeleteTimer::cRecMenuAskDeleteTimer(const cEvent *event) {
+ SetWidthPercent(50);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
++#else
+ cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
++#endif
+ cString text = cString::sprintf("%s \"%s, %s\" %s",
+ tr("Timer"),
+ *channelName,
+@@ -227,8 +242,15 @@
+ conflict->overlapStop));
+ SetFooter(new cRecMenuItemButton(tr("Ignore Conflict"), rmsIgnoreTimerConflict, false, true));
+ int i=0;
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++#endif
+ for(std::vector<int>::iterator it = conflict->timerIDs.begin(); it != conflict->timerIDs.end(); it++) {
++#if VDRVERSNUM > 20300
++ const cTimer *timer = Timers->Get(*it);
++#else
+ const cTimer *timer = Timers.Get(*it);
++#endif
+ if (timer) {
+ if (!AddMenuItemInitial(new cRecMenuItemTimer( timer,
+ rmsTimerConflictShowInfo,
+@@ -252,7 +274,12 @@
+
+ cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
+ if ((number >= 0) && (number < conflict->timerIDs.size())) {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ const cTimer *timer = Timers->Get(conflict->timerIDs[number]);
++#else
+ const cTimer *timer = Timers.Get(conflict->timerIDs[number]);
++#endif
+ cRecMenuItem *result = new cRecMenuItemTimer( timer,
+ rmsTimerConflictShowInfo,
+ rmsDeleteTimerConflictMenu,
+@@ -353,8 +380,14 @@
+ // --- cRecMenuConfirmRerunUsed ---------------------------------------------------------
+ cRecMenuConfirmRerunUsed::cRecMenuConfirmRerunUsed(const cEvent *original, const cEvent *replace) {
+ SetWidthPercent(70);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cString channelOrig = Channels->GetByChannelID(original->ChannelID())->Name();
++ cString channelReplace = Channels->GetByChannelID(replace->ChannelID())->Name();
++#else
+ cString channelOrig = Channels.GetByChannelID(original->ChannelID())->Name();
+ cString channelReplace = Channels.GetByChannelID(replace->ChannelID())->Name();
++#endif
+ cString message1 = tr("Timer for");
+ cString message2 = tr("replaced by rerun");
+ cString text = cString::sprintf("%s\n\"%s\", %s %s, %s\n%s\n\"%s\", %s %s, %s",
+@@ -508,7 +541,12 @@
+ }
+
+ cTimer *cRecMenuSeriesTimer::GetTimer(void) {
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cChannel *chan = (cChannel *)Channels->GetByNumber(channel);
++#else
+ cChannel *chan = Channels.GetByNumber(channel);
++#endif
+ cTimer *seriesTimer = new cTimer(NULL, NULL, chan);
+ cString fileName = "TITLE EPISODE";
+ if (folder.size() > 0) {
+@@ -789,8 +827,14 @@
+ startChannel = 1;
+ if (stopChannel == 0)
+ stopChannel = 1;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Start Channel"), (cChannel *)Channels->GetByNumber(startChannel), false, &startChannel, rmsSearchTimerSave));
++ useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), (cChannel *)Channels->GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
++#else
+ useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Start Channel"), Channels.GetByNumber(startChannel), false, &startChannel, rmsSearchTimerSave));
+ useChannelSubMenu.push_back(new cRecMenuItemChannelChooser(tr("Stop Channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
++#endif
+
+ useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start after"), startTime, false, &startTime, rmsSearchTimerSave));
+ useTimeSubMenu.push_back(new cRecMenuItemTime(tr("Start before"), stopTime, false, &stopTime, rmsSearchTimerSave));
+@@ -1214,7 +1258,12 @@
+ // --- cRecMenuSearchConfirmTimer ---------------------------------------------------------
+ cRecMenuSearchConfirmTimer::cRecMenuSearchConfirmTimer(const cEvent *event, eRecMenuState nextAction) {
+ SetWidthPercent(50);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cString channelName = Channels->GetByChannelID(event->ChannelID())->Name();
++#else
+ cString channelName = Channels.GetByChannelID(event->ChannelID())->Name();
++#endif
+ cString message = tr("Timer created");
+ cString text = cString::sprintf("%s\n%s\n%s %s - %s\n%s",
+ *message,
+@@ -1363,7 +1412,12 @@
+
+ void cRecMenuTimeline::GetTimersForDay(void) {
+ timersToday.clear();
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ for (cTimer *t = (cTimer *)Timers->First(); t; t = (cTimer *)Timers->Next(t)) {
++#else
+ for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) {
++#endif
+ if (((t->StartTime() > timeStart) && (t->StartTime() <= timeStop)) || ((t->StopTime() > timeStart) && (t->StopTime() <= timeStop))) {
+ timersToday.push_back(t);
+ }
+@@ -1558,4 +1612,4 @@
+ cTVGuideSearchTimer cRecMenuFavorites::GetFavorite(void) {
+ cRecMenuItemFavorite *activeItem = dynamic_cast<cRecMenuItemFavorite*>(GetActiveMenuItem());
+ return activeItem->GetFavorite();
+-}
+\ No newline at end of file
++}
+Index: b/searchtimer.c
+===================================================================
+--- a/searchtimer.c
++++ b/searchtimer.c
+@@ -16,8 +16,14 @@
+ startTime = 0000;
+ stopTime = 2359;
+ useChannel = false;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ channelMin = (cChannel *)Channels->GetByNumber(cDevice::CurrentChannel());
++ channelMax = (cChannel *)Channels->GetByNumber(cDevice::CurrentChannel());
++#else
+ channelMin = Channels.GetByNumber(cDevice::CurrentChannel());
+ channelMax = Channels.GetByNumber(cDevice::CurrentChannel());
++#endif
+ channelGroup = "";
+ useCase = false;
+ mode = 0;
+@@ -239,7 +245,12 @@
+ char *channelMinbuffer = NULL;
+ char *channelMaxbuffer = NULL;
+ int channels = sscanf(values[value].c_str(), "%a[^|]|%a[^|]", &channelMinbuffer, &channelMaxbuffer);
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ channelMin = (cChannel *)Channels->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
++#else
+ channelMin = Channels.GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true);
++#endif
+ if (!channelMin) {
+ channelMin = channelMax = NULL;
+ useChannel = 0;
+@@ -247,7 +258,12 @@
+ if (channels == 1)
+ channelMax = channelMin;
+ else {
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ channelMax = (cChannel *)Channels->GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
++#else
+ channelMax = Channels.GetByChannelID(tChannelID::FromString(channelMaxbuffer), true, true);
++#endif
+ if (!channelMax) {
+ channelMin = channelMax = NULL;
+ useChannel = 0;
+@@ -511,7 +527,12 @@
+ int numTimers = 0;
+ if (ID < 0)
+ return numTimers;
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ for (cTimer *timer = (cTimer *)Timers->First(); timer; timer = (cTimer *)Timers->Next(timer)) {
++#else
+ for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
++#endif
+ char* searchID = GetAuxValue(timer, "s-id");
+ if (!searchID) continue;
+ if (ID == atoi(searchID))
+@@ -525,7 +546,12 @@
+ int numRecordings = 0;
+ if (ID < 0)
+ return numRecordings;
++#if VDRVERSNUM > 20300
++ LOCK_RECORDINGS_READ;
++ for (cRecording *recording = (cRecording *)Recordings->First(); recording; recording = (cRecording *)Recordings->Next(recording)) {
++#else
+ for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {
++#endif
+ if (recording->IsEdited())
+ continue;
+ if (!recording->Info())
+Index: b/searchtimer.h
+===================================================================
+--- a/searchtimer.h
++++ b/searchtimer.h
+@@ -106,8 +106,13 @@
+ void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
+ void SetUseDesription(bool useDescription) { this->useDescription = useDescription; };
+ void SetUseChannel(bool useChannel) { this->useChannel = useChannel; };
++#if VDRVERSNUM > 20300
++ void SetStartChannel(int startChannel) { LOCK_CHANNELS_READ; channelMin = (cChannel *)Channels->GetByNumber(startChannel); };
++ void SetStopChannel(int stopChannel) { LOCK_CHANNELS_READ; channelMax = (cChannel *)Channels->GetByNumber(stopChannel); };
++#else
+ void SetStartChannel(int startChannel) { channelMin = Channels.GetByNumber(startChannel); };
+ void SetStopChannel(int stopChannel) { channelMax = Channels.GetByNumber(stopChannel); };
++#endif
+ void SetUseTime(bool useTime) { this->useTime = useTime; };
+ void SetStartTime(int startTime) { this->startTime = startTime; };
+ void SetStopTime(int stopTime) { this->stopTime = stopTime; };
+Index: b/tvguideosd.c
+===================================================================
+--- a/tvguideosd.c
++++ b/tvguideosd.c
+@@ -73,11 +73,20 @@
+
+ void cTvGuideOsd::drawOsd() {
+ cPixmap::Lock();
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ cChannel *startChannel = (cChannel *)Channels->GetByNumber(cDevice::CurrentChannel());
++#else
+ cChannel *startChannel = Channels.GetByNumber(cDevice::CurrentChannel());
++#endif
+ int numBack = tvguideConfig.numGrids / 2;
+ int offset = 0;
+ const cChannel *newStartChannel = startChannel;
++#if VDRVERSNUM > 20300
++ for (; newStartChannel ; newStartChannel = Channels->Prev(newStartChannel)) {
++#else
+ for (; newStartChannel ; newStartChannel = Channels.Prev(newStartChannel)) {
++#endif
+ if (newStartChannel && !newStartChannel->GroupSep()) {
+ offset++;
+ }
+@@ -85,7 +94,11 @@
+ break;
+ }
+ if (!newStartChannel)
++#if VDRVERSNUM > 20300
++ newStartChannel = Channels->First();
++#else
+ newStartChannel = Channels.First();
++#endif
+ offset--;
+ if (offset < 0)
+ offset = 0;
+@@ -122,7 +135,12 @@
+ columns.Clear();
+ if (!channelStart)
+ return;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ for (const cChannel *channel = channelStart; channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = channelStart; channel; channel = Channels.Next(channel)) {
++#endif
+ if (!channel->GroupSep()) {
+ if (channelGroups->IsInLastGroup(channel)) {
+ break;
+@@ -144,7 +162,11 @@
+ int numCurrent = columns.Count();
+ int numBack = tvguideConfig.numGrids - numCurrent;
+ int newChannelNumber = columns.First()->getChannel()->Number() - numBack;
++#if VDRVERSNUM > 20300
++ const cChannel *newStart = Channels->GetByNumber(newChannelNumber);
++#else
+ const cChannel *newStart = Channels.GetByNumber(newChannelNumber);
++#endif
+ readChannels(newStart);
+ }
+ }
+@@ -213,7 +235,12 @@
+ bool colAdded = false;
+ if (!colRight) {
+ const cChannel *channelRight = activeGrid->column->getChannel();
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ while (channelRight = Channels->Next(channelRight)) {
++#else
+ while (channelRight = Channels.Next(channelRight)) {
++#endif
+ if (!channelRight->GroupSep()) {
+ if (channelGroups->IsInLastGroup(channelRight)) {
+ break;
+@@ -263,7 +290,12 @@
+ bool colAdded = false;
+ if (!colLeft) {
+ const cChannel *channelLeft = activeGrid->column->getChannel();
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ while (channelLeft = Channels->Prev(channelLeft)) {
++#else
+ while (channelLeft = Channels.Prev(channelLeft)) {
++#endif
+ if (!channelLeft->GroupSep()) {
+ colLeft = new cChannelColumn(0, channelLeft, myTime);
+ if (colLeft->readGrids()) {
+@@ -431,14 +463,25 @@
+ int currentCol = activeGrid->column->GetNum();
+ const cChannel *prev = NULL;
+
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++#endif
+ if (tvguideConfig.channelJumpMode == eGroupJump) {
+ int prevNum = channelGroups->GetPrevGroupChannelNumber(currentChannel);
+ if (prevNum) {
++#if VDRVERSNUM > 20300
++ prev = Channels->GetByNumber(prevNum);
++#else
+ prev = Channels.GetByNumber(prevNum);
++#endif
+ }
+ } else if (tvguideConfig.channelJumpMode == eNumJump) {
+ int i = tvguideConfig.jumpChannels + 1;
++#if VDRVERSNUM > 20300
++ for (const cChannel *channel = firstChannel; channel; channel = Channels->Prev(channel)) {
++#else
+ for (const cChannel *channel = firstChannel; channel; channel = Channels.Prev(channel)) {
++#endif
+ if (!channel->GroupSep()) {
+ prev = channel;
+ i--;
+@@ -467,14 +510,25 @@
+ const cChannel *firstChannel = columns.First()->getChannel();
+ const cChannel *next = NULL;
+
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++#endif
+ if (tvguideConfig.channelJumpMode == eGroupJump) {
+ int nextNum = channelGroups->GetNextGroupChannelNumber(currentChannel);
+ if (nextNum) {
++#if VDRVERSNUM > 20300
++ next = Channels->GetByNumber(nextNum);
++#else
+ next = Channels.GetByNumber(nextNum);
++#endif
+ }
+ } else if (tvguideConfig.channelJumpMode == eNumJump) {
+ int i=0;
++#if VDRVERSNUM > 20300
++ for (const cChannel *channel = firstChannel; channel; channel = Channels->Next(channel)) {
++#else
+ for (const cChannel *channel = firstChannel; channel; channel = Channels.Next(channel)) {
++#endif
+ if (channelGroups->IsInLastGroup(channel)) {
+ break;
+ }
+@@ -625,7 +679,12 @@
+ int newChannelNum = channelJumper->GetChannel();
+ delete channelJumper;
+ channelJumper = NULL;
++#if VDRVERSNUM > 20300
++ LOCK_CHANNELS_READ;
++ const cChannel *newChannel = Channels->GetByNumber(newChannelNum);
++#else
+ const cChannel *newChannel = Channels.GetByNumber(newChannelNum);
++#endif
+ if (newChannel) {
+ readChannels(newChannel);
+ if (columns.Count() > 0) {
+Index: b/timerconflict.c
+===================================================================
+--- a/timerconflict.c
++++ b/timerconflict.c
+@@ -85,8 +85,15 @@
+ for (int i=0; i < numConflicts; i++) {
+ cTimeInterval *unionSet = NULL;
+ int numTimers = conflicts[i]->timerIDs.size();
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++#endif
+ for (int j=0; j < numTimers; j++) {
++#if VDRVERSNUM > 20300
++ const cTimer *timer = Timers->Get(conflicts[i]->timerIDs[j]);
++#else
+ const cTimer *timer = Timers.Get(conflicts[i]->timerIDs[j]);
++#endif
+ if (timer) {
+ if (!unionSet) {
+ unionSet = new cTimeInterval(timer->StartTime(), timer->StopTime());
+@@ -105,7 +112,11 @@
+
+ cTimeInterval *intersect = NULL;
+ for (int j=0; j < numTimers; j++) {
++#if VDRVERSNUM > 20300
++ const cTimer *timer = Timers->Get(conflicts[i]->timerIDs[j]);
++#else
+ const cTimer *timer = Timers.Get(conflicts[i]->timerIDs[j]);
++#endif
+ if (timer) {
+ if (!intersect) {
+ intersect = new cTimeInterval(timer->StartTime(), timer->StopTime());
+@@ -174,4 +185,4 @@
+ conflictsFound.push_back(conflicts[i]);
+ }
+ return conflictsFound;
+-}
+\ No newline at end of file
++}
+Index: b/view.c
+===================================================================
+--- a/view.c
++++ b/view.c
+@@ -130,7 +130,12 @@
+ timerMatch = (eTimerMatch)rtMatch.timerMatch;
+ ti = rtMatch.timer;
+ } else {
++#if VDRVERSNUM > 20300
++ LOCK_TIMERS_READ;
++ ti=(cTimer *)Timers->GetMatch(event, &timerMatch);
++#else
+ ti=Timers.GetMatch(event, &timerMatch);
++#endif
+ }
+ if (timerMatch == tmFull) {
+ cString recIconText(" REC ");
+@@ -1043,4 +1048,4 @@
+ }
+ DrawScrollbar();
+ osdManager.flush();
+-}
+\ No newline at end of file
++}
diff --git a/vdr-2.3.5-tvguide.diff b/vdr-2.3.5-tvguide.diff
new file mode 100644
index 000000000000..7b5e32e0b3aa
--- /dev/null
+++ b/vdr-2.3.5-tvguide.diff
@@ -0,0 +1,154 @@
+Index: b/epggrid.c
+===================================================================
+--- a/epggrid.c
++++ b/epggrid.c
+@@ -20,7 +20,7 @@
+ void cEpgGrid::SetViewportHeight() {
+ int viewportHeightOld = viewportHeight;
+ if ( column->Start() > StartTime() ) {
+- viewportHeight = (min((int)EndTime(), column->Stop()) - column->Start()) /60;
++ viewportHeight = (std::min((int)EndTime(), column->Stop()) - column->Start()) /60;
+ } else if ( column->Stop() < EndTime() ) {
+ viewportHeight = (column->Stop() - StartTime()) /60;
+ if (viewportHeight < 0) viewportHeight = 0;
+Index: b/imagecache.c
+===================================================================
+--- a/imagecache.c
++++ b/imagecache.c
+@@ -460,7 +460,7 @@
+ }
+ if (!cornerLeft || !cornerRight)
+ return;
+- int maxX = min(cornerWidth, imgWidth);
++ int maxX = std::min(cornerWidth, imgWidth);
+ for (int row = 0; row < cornerHeight; row++) {
+ for (int col = 0; col < maxX; ++col) {
+ img->SetPixel(cPoint(col, row), cornerLeft->GetPixel(cPoint(col, row)));
+@@ -482,7 +482,7 @@
+ }
+ if (!cornerHead || !cornerBottom)
+ return;
+- int maxY = min(cornerHeight, imgHeight);
++ int maxY = std::min(cornerHeight, imgHeight);
+ for (int row = 0; row < maxY; row++) {
+ for (int col = 0; col < cornerWidth; ++col) {
+ img->SetPixel(cPoint(col, row), cornerHead->GetPixel(cPoint(col, row)));
+@@ -527,7 +527,7 @@
+ int imgWidth = img->Width();
+ int imgHeight = img->Height();
+ int heightHeadBottom = groupsHead->Height();
+- int maxY = min(heightHeadBottom, imgHeight);
++ int maxY = std::min(heightHeadBottom, imgHeight);
+ for (int row = 0; row < maxY; row++) {
+ for (int col = 0; col < imgWidth; ++col) {
+ img->SetPixel(cPoint(col, row), groupsHead->GetPixel(cPoint(col, row)));
+@@ -542,7 +542,7 @@
+ int imgWidth = img->Width();
+ int imgHeight = img->Height();
+ int widthLeftRight = groupsLeft->Width();
+- int maxX = min(widthLeftRight, imgWidth);
++ int maxX = std::min(widthLeftRight, imgWidth);
+ for (int row = 0; row < imgHeight; row++) {
+ for (int col = 0; col < maxX; ++col) {
+ img->SetPixel(cPoint(col, row), groupsLeft->GetPixel(cPoint(col, row)));
+Index: b/recmenuitem.c
+===================================================================
+--- a/recmenuitem.c
++++ b/recmenuitem.c
+@@ -543,7 +543,7 @@
+ void cRecMenuItemSelect::DrawValue(void) {
+ pixmapVal->Fill(clrTransparent);
+ std::string textVal = strings[currentVal];
+- int iconSize = min(128, height);
++ int iconSize = std::min(128, height);
+ int textX = width - font->Width(textVal.c_str()) - iconSize;
+ int textY = (height - font->Height()) / 2;
+ pixmapVal->DrawText(cPoint(textX, textY), textVal.c_str(), colorText, clrTransparent, font);
+@@ -644,7 +644,7 @@
+
+ void cRecMenuItemSelectDirectory::DrawValue(void) {
+ pixmapVal->Fill(clrTransparent);
+- int iconSize = min(128, height);
++ int iconSize = std::min(128, height);
+ int textX = width - font->Width(folders[currentVal].c_str()) - iconSize;
+ int textY = (height - font->Height()) / 2;
+ pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font);
+@@ -948,7 +948,7 @@
+ if (specialChar)
+ addition = 1;
+ Utf8FromArray(startCharUtf8, p, numChars+addition);
+- int maxChars = min(numChars+1+addition, 8);
++ int maxChars = std::min(numChars+1+addition, 8);
+ char *smskey = new char[maxChars];
+ Utf8Strn0Cpy(smskey, p, maxChars);
+ return smskey;
+@@ -2161,7 +2161,7 @@
+ if (charWidth > maxWidth)
+ maxWidth = charWidth;
+ }
+- daysSize = min(maxWidth + 15, height-4);
++ daysSize = std::min(maxWidth + 15, height-4);
+ daysX = width - 10 - 7*daysSize;
+ daysY = (height - daysSize) / 2;
+ }
+Index: b/statusheader.c
+===================================================================
+--- a/statusheader.c
++++ b/statusheader.c
+@@ -82,7 +82,7 @@
+ int lineHeight = fontManager.FontStatusHeader->Height();
+ int textLines = description.Lines();
+ int maxLines = heightText / lineHeight;
+- int lines = min(textLines, maxLines);
++ int lines = std::min(textLines, maxLines);
+ for (int i = 0; i < lines-1; i++) {
+ pixmapText->DrawText(cPoint(x,y), description.GetLine(i), theme.Color(clrFont), colorTextBack, fontManager.FontStatusHeader);
+ y += lineHeight;
+@@ -139,4 +139,4 @@
+ pixmapTVFrame->DrawEllipse(cRect(frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -3);
+ pixmapTVFrame->DrawRectangle(cRect(0, height - frame, tvFrameWidth, frame), theme.Color(clrBackgroundOSD));
+ pixmapTVFrame->DrawEllipse(cRect(tvFrameWidth - radius - frame, height - radius - frame, radius, radius), theme.Color(clrBackgroundOSD), -4);
+-}
+\ No newline at end of file
++}
+Index: b/switchtimer.c
+===================================================================
+--- a/switchtimer.c
++++ b/switchtimer.c
+@@ -20,6 +20,23 @@
+ }
+ }
+
++cSwitchTimer::cSwitchTimer(const cSwitchTimer &SwitchTimer) {
++ eventID = 0;
++ startTime = 0;
++ switchMinsBefore = 0;
++ announceOnly = 0;
++ *this = SwitchTimer;
++}
++
++cSwitchTimer& cSwitchTimer::operator= (const cSwitchTimer &SwitchTimer) {
++ this->eventID = SwitchTimer.eventID;
++ this->startTime = SwitchTimer.startTime;
++ this->channelID = SwitchTimer.channelID;
++ this->switchMinsBefore = SwitchTimer.switchMinsBefore;
++ this->announceOnly = SwitchTimer.announceOnly;
++ return *this;
++}
++
+ bool cSwitchTimer::Parse(const char *s) {
+ char *line;
+ char *pos;
+Index: b/switchtimer.h
+===================================================================
+--- a/switchtimer.h
++++ b/switchtimer.h
+@@ -12,6 +12,8 @@
+ int announceOnly;
+ cSwitchTimer(void);
+ cSwitchTimer(const cEvent* Event);
++ cSwitchTimer(const cSwitchTimer &SwitchTimer);
++ cSwitchTimer& operator= (const cSwitchTimer &SwitchTimer);
+ bool Parse(const char *s);
+ void SetEventID(tEventID eventID) { this->eventID = eventID; };
+ void SetStartTime(time_t startTime) { this->startTime = startTime; };
diff --git a/vdr-2.3.7-tvguide.diff b/vdr-2.3.7-tvguide.diff
new file mode 100644
index 000000000000..1a5eca5c4f97
--- /dev/null
+++ b/vdr-2.3.7-tvguide.diff
@@ -0,0 +1,14 @@
+Index: b/channelcolumn.h
+===================================================================
+--- a/channelcolumn.h
++++ b/channelcolumn.h
+@@ -20,7 +20,9 @@
+ const cChannel *channel;
+ cHeaderGrid *header;
+ cList<cGrid> grids;
++#if VDRVERSNUM < 20300
+ cSchedulesLock *schedulesLock;
++#endif
+ const cSchedules *schedules;
+ bool hasTimer;
+ bool hasSwitchTimer;