[vdr-plugin-remotetimers] 05/05: * Added VDR 2.1.2 compatibility patch from yaVDR / Lars Hanisch * Build-depend on vdr-dev (>= 2.1.10) * Standards-Version: 3.9.6
Tobias Grimm
tiber-guest at moszumanska.debian.org
Sat Feb 14 10:11:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
tiber-guest pushed a commit to branch master
in repository vdr-plugin-remotetimers.
commit 624f7ceb8c8df6ccfe4171e9a1844e06c506668f
Author: etobi <git at e-tobi.net>
Date: Sat Feb 14 10:57:36 2015 +0100
* Added VDR 2.1.2 compatibility patch from yaVDR / Lars Hanisch
* Build-depend on vdr-dev (>= 2.1.10)
* Standards-Version: 3.9.6
---
debian/changelog | 3 +
debian/control | 4 +-
debian/patches/series | 1 +
debian/patches/vdr-2.1.x-compat.patch | 134 ++++++++++++++++++++++++++++++++++
4 files changed, 140 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9dd50e9..a188929 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
vdr-plugin-remotetimers (1.0.1-1) unstable; urgency=medium
* New upstream release
+ * Added VDR 2.1.2 compatibility patch from yaVDR / Lars Hanisch
+ * Build-depend on vdr-dev (>= 2.1.10)
+ * Standards-Version: 3.9.6
-- Tobias Grimm <etobi at debian.org> Tue, 10 Feb 2015 09:50:11 +0100
diff --git a/debian/control b/debian/control
index b9b03c3..7f15f9c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,8 +3,8 @@ Section: video
Priority: extra
Maintainer: Debian VDR Team <pkg-vdr-dvb-devel at lists.alioth.debian.org>
Uploaders: Tobias Grimm <etobi at debian.org>, Thomas Günther <tom at toms-cafe.de>
-Build-Depends: debhelper (>= 9), vdr-dev (>= 2.1.9), gettext, pkg-config, svdrpservice-dev
-Standards-Version: 3.9.5
+Build-Depends: debhelper (>= 9), vdr-dev (>= 2.1.10), gettext, pkg-config, svdrpservice-dev
+Standards-Version: 3.9.6
Homepage: http://vdr.schmirler.de
Vcs-Git: git://git.debian.org/git/pkg-vdr-dvb/vdr-plugin-remotetimers.git
Vcs-Browser: http://git.debian.org/?p=pkg-vdr-dvb/vdr-plugin-remotetimers.git
diff --git a/debian/patches/series b/debian/patches/series
index aa22a93..31a45b8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01_include_path.patch
+vdr-2.1.x-compat.patch
diff --git a/debian/patches/vdr-2.1.x-compat.patch b/debian/patches/vdr-2.1.x-compat.patch
new file mode 100644
index 0000000..748a123
--- /dev/null
+++ b/debian/patches/vdr-2.1.x-compat.patch
@@ -0,0 +1,134 @@
+--- a/menu.c
++++ b/menu.c
+@@ -189,14 +189,23 @@
+ bool cFreeDiskSpace::HasChanged(const char *SubDir, bool ForceCheck)
+ {
+ cString path(ExchangeChars(strdup(SubDir ? SubDir : ""), true), true);
++#if APIVERSNUM > 20101
++ path = cString::sprintf("%s/%s", cVideoDirectory::Name(), *path);
++#else
+ path = cString::sprintf("%s/%s", VideoDirectory, *path);
++#endif
+ if (ForceCheck || time(NULL) - lastDiskSpaceCheck > DISKSPACECHEK || !EntriesOnSameFileSystem(path, lastPath)) {
+ int FreeMB;
+ int Percent;
+ int MBperMinute = -1;
+ lastPath = path;
++#if APIVERSNUM > 20101
++ if (cVideoDirectory::IsOnVideoDirectoryFileSystem(path)) {
++ Percent = cVideoDirectory::VideoDiskSpace(&FreeMB);
++#else
+ if (IsOnVideoDirectoryFileSystem(path)) {
+ Percent = ::VideoDiskSpace(&FreeMB);
++#endif
+ MBperMinute = Recordings.MBperMinute();
+ }
+ else {
+@@ -1758,8 +1767,13 @@
+ int len = strlen(RemoteTimersSetup.serverDir);
+ bool remote = len == 0 || (strstr(name, RemoteTimersSetup.serverDir) == name && name[len] == FOLDERDELIMCHAR);
+ if (!remote) {
++#if APIVERSNUM > 20101
++ if (RecordingsHandler.GetUsage(*fileName) == ruNone) {
++ if (RecordingsHandler.Add(ruCut, *fileName))
++#else
+ if (!cCutter::Active()) {
+ if (cCutter::Start(*fileName))
++#endif
+ Skins.Message(mtInfo, tr("Editing process started"));
+ else
+ Skins.Message(mtError, tr("Can't start editing process!"));
+@@ -1898,7 +1912,11 @@
+ name[len] = '\0';
+ }
+ cString newName(ExchangeChars(strdup(name), true), true);
++#if APIVERSNUM > 20101
++ newName = cString::sprintf("%s/%s%s", cVideoDirectory::Name(), *newName, p);
++#else
+ newName = cString::sprintf("%s/%s%s", VideoDirectory, *newName, p);
++#endif
+ bool wasMoving = cMoveRec::IsMoving();
+ if (Rename(Recording, newName)) {
+ // keep old name when moving recording in background
+@@ -2215,7 +2233,11 @@
+
+ cString cMenuRecordings::DirectoryName(void)
+ {
++#if APIVERSNUM > 20101
++ cString d(cVideoDirectory::Name());
++#else
+ cString d(VideoDirectory);
++#endif
+ if (base) {
+ char *s = ExchangeChars(strdup(base), true);
+ d = AddDirectory(d, s);
+@@ -2312,9 +2334,17 @@
+ }
+ cRecording *recording = ri->Recording();
+ cString FileName = recording->FileName();
++#if APIVERSNUM > 20101
++ if (RecordingsHandler.GetUsage(*FileName) != ruNone) {
++#else
+ if (cCutter::Active(ri->Recording()->FileName())) {
++#endif
+ if (Interface->Confirm(tr("Recording is being edited - really delete?"))) {
++#if APIVERSNUM > 20101
++ RecordingsHandler.Del(*FileName);
++#else
+ cCutter::Stop();
++#endif
+ recording = Recordings.GetByName(FileName); // cCutter::Stop() might have deleted it if it was the edited version
+ // we continue with the code below even if recording is NULL,
+ // in order to have the menu updated etc.
+--- a/remotetimers.c
++++ b/remotetimers.c
+@@ -172,11 +172,23 @@
+ if (*RemoteTimersSetup.serverDir) {
+ ir->name = cString::sprintf("%s~%s", RemoteTimersSetup.serverDir, recording.Name());
+
++#if APIVERSNUM > 20101
++ int len = strlen(cVideoDirectory::Name());
++#else
+ int len = strlen(VideoDirectory);
++#endif
+ ir->fileName = recording.FileName();
++#if APIVERSNUM > 20101
++ if (strncmp(ir->fileName, cVideoDirectory::Name(), strlen(cVideoDirectory::Name())) == 0 && ir->fileName[len] == '/') {
++#else
+ if (strncmp(ir->fileName, VideoDirectory, strlen(VideoDirectory)) == 0 && ir->fileName[len] == '/') {
++#endif
+ char *serverDir = ExchangeChars(strdup(RemoteTimersSetup.serverDir), true);
++#if APIVERSNUM > 20101
++ ir->fileName = cString::sprintf("%s/%s%s", cVideoDirectory::Name(), serverDir, ir->fileName + len);
++#else
+ ir->fileName = cString::sprintf("%s/%s%s", VideoDirectory, serverDir, ir->fileName + len);
++#endif
+ free(serverDir);
+ }
+ else {
+--- a/watcher.c
++++ b/watcher.c
+@@ -44,7 +44,11 @@
+ cUpdateWatcher::cUpdateWatcher(): cThread("remotetimers update file watcher")
+ {
+ serverLastModifiedTime = 0;
++#if APIVERSNUM > 20101
++ clientUpdateFile = AddDirectory(cVideoDirectory::Name(), ".update");
++#else
+ clientUpdateFile = AddDirectory(VideoDirectory, ".update");
++#endif
+ clientLastDev = 0;
+ inSubDir = false;
+ }
+@@ -63,7 +67,11 @@
+ // server recordings in subdir: check mtime of subdir/.update
+ char *tmpDir = strdup(RemoteTimersSetup.serverDir);
+ tmpDir = ExchangeChars(tmpDir, true);
++#if APIVERSNUM > 20101
++ serverUpdateFile = AddDirectory(cVideoDirectory::Name(), AddDirectory(tmpDir, ".update"));
++#else
+ serverUpdateFile = AddDirectory(VideoDirectory, AddDirectory(tmpDir, ".update"));
++#endif
+ serverLastModifiedTime = LastModifiedTime(serverUpdateFile);
+ free(tmpDir);
+ }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-remotetimers.git
More information about the pkg-vdr-dvb-changes
mailing list