summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2015-02-08 17:53:38 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2015-02-08 17:53:38 +0100
commitba176a019748e25fc9be3160001691714aa7f1f7 (patch)
tree0b390dd8a578f569a93d3e0382c38bcbecabcbc7 /tools.cpp
parent0b618e9f1850ceb66c4cfffa78b67baeeb10fbe5 (diff)
downloadvdr-plugin-live-ba176a019748e25fc9be3160001691714aa7f1f7.tar.gz
vdr-plugin-live-ba176a019748e25fc9be3160001691714aa7f1f7.tar.bz2
Adapt Live Plugin to compile with VDR versions 2.1.2 and higher (thanks to Ingo Prochaska)
Diffstat (limited to 'tools.cpp')
-rw-r--r--tools.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools.cpp b/tools.cpp
index c744d06..ddfacd0 100644
--- a/tools.cpp
+++ b/tools.cpp
@@ -365,7 +365,11 @@ namespace vdrlive {
stat(source.c_str(), &st1);
stat(target.c_str(),&st2);
if (!copy && (st1.st_dev == st2.st_dev)) {
+#if APIVERSNUM > 20101
+ if (!cVideoDirectory::RenameVideoFile(source.c_str(), target.c_str())) {
+#else
if (!RenameVideoFile(source.c_str(), target.c_str())) {
+#endif
esyslog("[LIVE]: rename failed from %s to %s", source.c_str(), target.c_str());
return false;
}
@@ -461,7 +465,11 @@ namespace vdrlive {
size_t found = source.find_last_of(delim);
if (found != std::string::npos) {
source = source.substr(0, found);
+#if APIVERSNUM > 20101
+ while (source != cVideoDirectory::Name()) {
+#else
while (source != VideoDirectory) {
+#endif
found = source.find_last_of(delim);
if (found == std::string::npos)
break;
@@ -478,7 +486,11 @@ namespace vdrlive {
size_t found = target.find_last_of(delim);
if (found != std::string::npos) {
target = target.substr(0, found);
+#if APIVERSNUM > 20101
+ while (target != cVideoDirectory::Name()) {
+#else
while (target != VideoDirectory) {
+#endif
found = target.find_last_of(delim);
if (found == std::string::npos)
break;