From patchwork Wed May 28 05:47:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Prochaska X-Patchwork-Id: 24086 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1WpWiJ-0008TN-N0; Wed, 28 May 2014 07:47:47 +0200 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1WpWiF-0008TD-US for vdr@linuxtv.org; Wed, 28 May 2014 07:47:45 +0200 X-tubIT-Incoming-IP: 212.227.15.18 Received: from mout.gmx.net ([212.227.15.18]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtps [UNKNOWN:AES256-SHA256:256] for id 1WpWiE-0006Aq-kK; Wed, 28 May 2014 07:47:43 +0200 Received: from kauz ([80.226.0.10]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MYfre-1XKkvu48d0-00VPUH for ; Wed, 28 May 2014 07:47:41 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 From: Ingo Prochaska Date: Wed, 28 May 2014 07:47:37 +0200 To: VDR Mailing List Message-ID: X-Provags-ID: V03:K0:mvwS56Zjendw04R++r+jYYC7rwaIvh1ojsWBDko+pzxe8DMUSPE +D0358LBUwgw/gLlhiWWkHGLc/0lvPpZK4/9WRMBx1iLq/klYx8U1/IlwY3x03UCKuEXN/O VuL2BvX+adAiPZ6QvUSQHQR5G+a0cfZempC0I8pz8tNGcpgsD2K7UUQ/v9q3Na24KEZZwcd CMfC8ghzWu6xpEs7X7piQ== X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.5.28.53918 X-PMX-Spam: Gauge=XIII, Probability=13%, Report=' BASE64_ENC_TEXT 0.5, SXL_IP_PROXY_RCVD 0.5, HTML_50_70 0.1, MSGID_ADDED_BY_MTA 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_5000_5999 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __FORWARDED_MSG 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_HTML 0, __MIME_VERSION 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TAG_EXISTS_HTML 0, __TO_MALFORMED_2 0, __URI_NS , __USER_AGENT 0' X-LSpam-Score: 2.8 (++) X-LSpam-Report: No, score=2.8 required=5.0 tests=BAYES_40=-0.001, FREEMAIL_FROM=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793 autolearn=no Subject: Re: [vdr] vdr-live-plugin X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org Yes. On 28. Mai 2014 00:52:45 MESZ, jacek burghardt wrote: >Is there patch for vdr live plugin wen using vdr 2.1.6. > > >------------------------------------------------------------------------ > >_______________________________________________ >vdr mailing list >vdr@linuxtv.org >http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 80f145b..df34c67 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -79,7 +79,11 @@ for (deletions_type::const_iterator it = deletions.begin(); it != deletions.end( deletions.clear(); int FreeMB, UsedMB; +#if APIVERSNUM > 20101 +int Percent = cVideoDirectory::VideoDiskSpace(&FreeMB, &UsedMB); +#else int Percent = VideoDiskSpace(&FreeMB, &UsedMB); +#endif int Minutes = int(double(FreeMB) / MB_PER_MINUTE); int Hours = Minutes / 60; Minutes %= 60; diff --git a/recman.cpp b/recman.cpp index 6a2fc00..ade3d93 100644 --- a/recman.cpp +++ b/recman.cpp @@ -112,7 +112,11 @@ namespace vdrlive { if (found == string::npos) return false; +#if APIVERSNUM > 20101 + string newname = string(cVideoDirectory::Name()) + "/" + name + oldname.substr(found); +#else string newname = string(VideoDirectory) + "/" + name + oldname.substr(found); +#endif if (!MoveDirectory(oldname.c_str(), newname.c_str(), copy)) { esyslog("[LIVE]: renaming failed from '%s' to '%s'", oldname.c_str(), newname.c_str()); 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;