summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Reimer2019-08-16 20:09:38 +0200
committerManuel Reimer2019-08-16 20:09:38 +0200
commitf33f0eb03f2a1f0e1593cbd41e5a88faeeab06c8 (patch)
tree65011c64a383c06a9cd6c859bbecdace22344048
parent57970fec8f7b07bd69b0147004ea07d5b9ba0944 (diff)
downloadaur-f33f0eb03f2a1f0e1593cbd41e5a88faeeab06c8.tar.gz
Sync from VDR4Arch (https://github.com/VDR4Arch/vdr4arch/commit/88d60e67e49b14e57ef649572e8c712d4a920109)
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--vdr-epgsync-vdr-2.3.2.patch70
3 files changed, 76 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 293a39342e24..c7aed6ada11f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by makepkg 5.1.3
-# Tue Jun 18 20:43:22 UTC 2019
+# Fri Aug 16 18:09:38 UTC 2019
pkgbase = vdr-epgsync
pkgdesc = Import the EPG of a remote VDR
pkgver = 1.0.1
@@ -15,9 +15,9 @@ pkgbase = vdr-epgsync
depends = vdr-api=2.4.1
backup = etc/vdr/conf.avail/50-epgsync.conf
source = http://vdr.schmirler.de/epgsync/vdr-epgsync-1.0.1.tgz
- source = vdr-2.3.2-epgsync-1.0.1_v2.diff::https://www.vdr-portal.de/index.php?attachment/40535
+ source = vdr-epgsync-vdr-2.3.2.patch
md5sums = 694024ecd7bb813d43620ded63fc3ab4
- md5sums = 779d3c997ea2bdf667752affff102f75
+ md5sums = 24a386237052d15ceb7c78f51e28553d
pkgname = vdr-epgsync
diff --git a/PKGBUILD b/PKGBUILD
index ebf03608348a..9edbd7765780 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,14 +12,14 @@ license=('GPL2')
depends=('gcc-libs' "vdr-api=${_vdrapi}")
_plugname=${pkgname//vdr-/}
source=("http://vdr.schmirler.de/$_plugname/$pkgname-$pkgver.tgz"
- "vdr-2.3.2-epgsync-1.0.1_v2.diff::https://www.vdr-portal.de/index.php?attachment/40535")
+ "$pkgname-vdr-2.3.2.patch")
backup=("etc/vdr/conf.avail/50-$_plugname.conf")
md5sums=('694024ecd7bb813d43620ded63fc3ab4'
- '779d3c997ea2bdf667752affff102f75')
+ '24a386237052d15ceb7c78f51e28553d')
prepare() {
cd "${srcdir}/${_plugname}-${pkgver}"
- patch -p1 -i "$srcdir/vdr-2.3.2-epgsync-1.0.1_v2.diff"
+ patch -p1 -i "$srcdir/$pkgname-vdr-2.3.2.patch"
}
build() {
diff --git a/vdr-epgsync-vdr-2.3.2.patch b/vdr-epgsync-vdr-2.3.2.patch
new file mode 100644
index 000000000000..b66a66c1df10
--- /dev/null
+++ b/vdr-epgsync-vdr-2.3.2.patch
@@ -0,0 +1,70 @@
+Author: fnu
+https://www.vdr-portal.de/forum/index.php?thread/130045-produktive-problem-und-pluginl%C3%B6sungen-f%C3%BCr-vdr-2-3-2-und-h%C3%B6her/&postID=1284634#post1284634
+
+Index: b/thread.c
+===================================================================
+--- a/thread.c
++++ b/thread.c
+@@ -42,9 +42,18 @@
+ }
+ }
+
++#if APIVERSNUM < 20301
+ cChannel *GetChannelByName(const char* Name, const cChannel *IgnoreChannel = NULL, eChannelTypes Type = ctAll)
++#else
++const cChannel *GetChannelByName(const char* Name, const cChannel *IgnoreChannel = NULL, eChannelTypes Type = ctAll)
++#endif
+ {
++#if APIVERSNUM < 20301
+ for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
++#else
++ LOCK_CHANNELS_READ;
++ for (const cChannel *channel = Channels->First(); channel; channel = Channels->Next(channel)) {
++#endif
+ if (strcasecmp(Name, channel->Name()) == 0 || strcasecmp(Name, channel->ShortName()) == 0) {
+ if (IsType(channel, Type) && channel != IgnoreChannel)
+ return channel;
+@@ -95,6 +104,7 @@
+ if (EpgSyncSetup.redirectChannels == rcmId) {
+ // Direct import, no mapping:
+ // loop through local channels, get channels by ID
++#if APIVERSNUM < 20301
+ cSchedulesLock *lock = NULL;
+ for (cChannel *channel = Channels.First(); channel && Running();
+ channel = Channels.Next(channel)) {
+@@ -102,13 +112,22 @@
+ lock = new cSchedulesLock();
+ if (cSchedules::Schedules(*lock)->GetSchedule(channel)) {
+ DELETENULL(lock);
++#else
++ LOCK_CHANNELS_READ;
++ for (const cChannel *channel = Channels->First(); channel && Running();
++ channel = Channels->Next(channel)) {
++ LOCK_SCHEDULES_READ;
++ if (Schedules->GetSchedule(channel)) {
++#endif
+ if (CmdLSTE(f, *channel->GetChannelID().ToString())) {
+ AddSchedule(f);
+ }
+ cCondWait::SleepMs(EPGSYNC_SLEEPMS);
+ }
+ }
++#if APIVERSNUM < 20301
+ DELETENULL(lock);
++#endif
+ }
+ else {
+ // Map channels by name:
+@@ -182,7 +201,12 @@
+ targetChannel = NULL;
+
+ const char* p = skipspace(s + 1);
++#if APIVERSNUM < 20301
+ cChannel *c = Channels.GetByChannelID(tChannelID::FromString(p));
++#else
++ LOCK_CHANNELS_READ;
++ const cChannel *c = Channels->GetByChannelID(tChannelID::FromString(p));
++#endif
+ bool cOk = IsType(c, (eChannelTypes) EpgSyncSetup.channelTypes);
+
+ if (cOk && EpgSyncSetup.redirectChannels != rcmNameId) {