]> git.vomp.tv Git - vompserver.git/commitdiff
Patch to support VDR 2.1.2 from CReimer
authorChris Tallon <chris@telescope.org>
Wed, 5 Feb 2014 17:41:58 +0000 (17:41 +0000)
committerChris Tallon <chris@telescope.org>
Wed, 5 Feb 2014 17:41:58 +0000 (17:41 +0000)
vompclientrrproc.c

index 4698eb3e8469783a53e5ee43dbd7eb276257e40a..0732274b6a4b68af62420cd48957f6a764d16ff5 100644 (file)
@@ -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);