From patchwork Tue Sep 11 07:29:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hondansx@gmx.de X-Patchwork-Id: 14278 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TBKuW-0004oR-Vd; Tue, 11 Sep 2012 09:29:28 +0200 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1TBKuU-0004oM-B5 for vdr@linuxtv.org; Tue, 11 Sep 2012 09:29:26 +0200 X-tubIT-Incoming-IP: 213.165.64.23 Received: from mailout-de.gmx.net ([213.165.64.23]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with smtp for id 1TBKuT-0003f9-CP; Tue, 11 Sep 2012 09:29:26 +0200 Received: (qmail invoked by alias); 11 Sep 2012 07:29:23 -0000 Received: from p54A44FEE.dip.t-dialin.net (EHLO yaris.yaris.dyndns.org) [84.164.79.238] by mail.gmx.net (mp029) with SMTP; 11 Sep 2012 09:29:23 +0200 X-Authenticated: #722319 X-Provags-ID: V01U2FsdGVkX1/yBUp5jl7yURzvYCE9CazBwIGNypcqxgoywvbTZa Xv50fLpAHYN+T1 Received: from yaris.dyndns.org (localhost [127.0.0.1]) by yaris.yaris.dyndns.org (Postfix) with ESMTP id 4C49F79C7B for ; Tue, 11 Sep 2012 09:29:22 +0200 (CEST) Received: from mailmx.topstar.de ([62.153.242.226]) (SquirrelMail authenticated user yaris) by yaris.dyndns.org with HTTP; Tue, 11 Sep 2012 09:29:22 +0200 Message-ID: <5a1878ee42f366cf0c7979001d99f995.squirrel@yaris.dyndns.org> In-Reply-To: <201209101638.18435.geronimo013@gmx.de> References: <504DF3A5.9070102@tvdr.de> <201209101638.18435.geronimo013@gmx.de> Date: Tue, 11 Sep 2012 09:29:22 +0200 From: hondansx@gmx.de To: "VDR Mailing List" User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-Y-GMX-Trusted: 0 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.11.71817 X-PMX-Spam: Gauge=XI, Probability=11%, Report=' PRIORITY_NO_NAME 0.716, HTML_00_01 0.05, HTML_00_10 0.05, MIME_TEXT_ONLY_MP_MIXED 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, NO_REAL_NAME 0, NO_URI_FOUND 0, WEBMAIL_SOURCE 0, WEBMAIL_USER_AGENT 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_PRIORITY 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __PHISH_SPEAR_STRUCTURE_1 0, __PHISH_SPEAR_STRUCTURE_2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, FSL_RCVD_USER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793 autolearn=no Subject: [vdr] [PATCH] vdr-1.7.30 & call cmd after a recording is deleted 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 Hi, attached is a patch which extends the cmd call function to: if a recording is deleted. The cmd call 'edited' where not mentioned, which I now did. Would be nice, if it find's a way into the main vdr. Alexander Alexander Wenzel, call CMD after a recording where deleted diff -ruNp vdr-1.7.30/recording.c vdr-1.7.30-patched/recording.c --- vdr-1.7.30/recording.c 2012-09-06 11:57:31.000000000 +0200 +++ vdr-1.7.30-patched/recording.c 2012-09-11 08:56:57.512288266 +0200 @@ -1010,8 +1010,10 @@ bool cRecording::Delete(void) RemoveVideoFile(NewName); } isyslog("deleting recording '%s'", FileName()); - if (access(FileName(), F_OK) == 0) + if (access(FileName(), F_OK) == 0) { result = RenameVideoFile(FileName(), NewName); + cRecordingUserCommand::InvokeCommand(RUC_DELETERECORDING, NewName); + } else { isyslog("recording '%s' vanished", FileName()); result = true; // well, we were going to delete it, anyway diff -ruNp vdr-1.7.30/recording.h vdr-1.7.30-patched/recording.h --- vdr-1.7.30/recording.h 2012-09-06 11:59:11.000000000 +0200 +++ vdr-1.7.30-patched/recording.h 2012-09-11 08:58:04.896762990 +0200 @@ -240,6 +240,7 @@ public: #define RUC_BEFORERECORDING "before" #define RUC_AFTERRECORDING "after" #define RUC_EDITEDRECORDING "edited" +#define RUC_DELETERECORDING "deleted" class cRecordingUserCommand { private: diff -ruNp vdr-1.7.30/vdr.c vdr-1.7.30-patched/vdr.c --- vdr-1.7.30/vdr.c 2012-09-01 15:30:19.000000000 +0200 +++ vdr-1.7.30-patched/vdr.c 2012-09-11 09:01:35.334205183 +0200 @@ -466,7 +466,7 @@ int main(int argc, char *argv[]) " -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n" " 0 turns off SVDRP\n" " -P OPT, --plugin=OPT load a plugin defined by the given options\n" - " -r CMD, --record=CMD call CMD before and after a recording\n" + " -r CMD, --record=CMD call CMD before, after, edited or delete a recording\n" " --resdir=DIR read resource files from DIR (default: %s)\n" " -s CMD, --shutdown=CMD call CMD to shutdown the computer\n" " --split split edited files at the editing marks (only\n"