From f6cd21c65014cce9f6db67a15d86948cc8875c74 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 5 Feb 2014 17:41:58 +0000 Subject: [PATCH] Patch to support VDR 2.1.2 from CReimer --- vompclientrrproc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vompclientrrproc.c b/vompclientrrproc.c index 4698eb3..0732274 100644 --- a/vompclientrrproc.c +++ b/vompclientrrproc.c @@ -657,7 +657,11 @@ int VompClientRRProc::processGetLanguageContent() int VompClientRRProc::processGetRecordingsList() { int FreeMB; +#if APIVERSNUM > 20101 + int Percent = cVideoDirectory::VideoDiskSpace(&FreeMB); +#else int Percent = VideoDiskSpace(&FreeMB); +#endif int Total = (FreeMB / (100 - Percent)) * 100; resp->addULONG(Total); @@ -799,16 +803,26 @@ int VompClientRRProc::processMoveRecording() log->log("RRProc", Log::DEBUG, "datedirname: %s", dateDirName); log->log("RRProc", Log::DEBUG, "titledirname: %s", titleDirName); +#if APIVERSNUM > 20101 + log->log("RRProc", Log::DEBUG, "viddir: %s", cVideoDirectory::Name()); +#else log->log("RRProc", Log::DEBUG, "viddir: %s", VideoDirectory); +#endif char* newPathConv = new char[strlen(newPath)+1]; strcpy(newPathConv, newPath); ExchangeChars(newPathConv, true); log->log("RRProc", Log::DEBUG, "EC: %s", newPathConv); +#if APIVERSNUM > 20101 + char* newContainer = new char[strlen(cVideoDirectory::Name()) + strlen(newPathConv) + strlen(titleDirName) + 1]; + log->log("RRProc", Log::DEBUG, "l10: %i", strlen(cVideoDirectory::Name()) + strlen(newPathConv) + strlen(titleDirName) + 1); + sprintf(newContainer, "%s%s%s", cVideoDirectory::Name(), newPathConv, titleDirName); +#else char* newContainer = new char[strlen(VideoDirectory) + strlen(newPathConv) + strlen(titleDirName) + 1]; log->log("RRProc", Log::DEBUG, "l10: %i", strlen(VideoDirectory) + strlen(newPathConv) + strlen(titleDirName) + 1); sprintf(newContainer, "%s%s%s", VideoDirectory, newPathConv, titleDirName); +#endif delete[] newPathConv; log->log("RRProc", Log::DEBUG, "%s", newContainer); -- 2.39.5