rpms/grip/devel grip-3.2.0-executionpatch.patch, NONE, 1.1 grip.spec, 1.22, 1.23

Adrian Reber (adrian) fedora-extras-commits at redhat.com
Sun Aug 10 15:37:44 UTC 2008


Author: adrian

Update of /cvs/extras/rpms/grip/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28087

Modified Files:
	grip.spec 
Added Files:
	grip-3.2.0-executionpatch.patch 
Log Message:
* Sun Aug 10 2008 Adrian Reber <adrian at lisas.de> - 1:3.2.0-21
- added "execute command after encode" patch (#457186)


grip-3.2.0-executionpatch.patch:

--- NEW FILE grip-3.2.0-executionpatch.patch ---
diff -ur grip-3.2.0.clean/src/grip.c grip-3.2.0/src/grip.c
--- grip-3.2.0.clean/src/grip.c	2004-04-15 20:23:54.000000000 +0200
+++ grip-3.2.0/src/grip.c	2008-08-10 17:23:41.000000000 +0200
@@ -129,7 +129,9 @@
 {"vol_vis",CFG_ENTRY_BOOL,0,&uinfo->volvis},\
 {"track_edit_vis",CFG_ENTRY_BOOL,0,&uinfo->track_edit_visible},\
 {"track_prog_vis",CFG_ENTRY_BOOL,0,&uinfo->track_prog_visible},\
-{"volume",CFG_ENTRY_INT,0,&ginfo->volume},
+{"volume",CFG_ENTRY_INT,0,&ginfo->volume},\
+{"execute_after_encode",CFG_ENTRY_STRING,265,ginfo->execute_after_encode},\
+{"execute_after_encode_params",CFG_ENTRY_STRING,265,ginfo->execute_after_encode_params},
 
 #define CDPAR_CFG_ENTRIES \
 {"disable_paranoia",CFG_ENTRY_BOOL,0,&ginfo->disable_paranoia},\
diff -ur grip-3.2.0.clean/src/gripcfg.c grip-3.2.0/src/gripcfg.c
--- grip-3.2.0.clean/src/gripcfg.c	2004-04-15 20:20:15.000000000 +0200
+++ grip-3.2.0/src/gripcfg.c	2008-08-10 17:23:41.000000000 +0200
@@ -482,6 +482,18 @@
 		     255,TRUE);
   gtk_box_pack_start(GTK_BOX(vbox),entry,FALSE,FALSE,0);
   gtk_widget_show(entry);
+  
+  entry=MakeStrEntry(NULL,ginfo->execute_after_encode,_("Execute command after encode"),
+		     255,TRUE);
+  gtk_box_pack_start(GTK_BOX(vbox),entry,FALSE,FALSE,0);
+  gtk_widget_show(entry);
+
+  entry=MakeStrEntry(NULL,ginfo->execute_after_encode_params,_("Execute command after encode params"),
+		     255,TRUE);
+  gtk_box_pack_start(GTK_BOX(vbox),entry,FALSE,FALSE,0);
+  gtk_widget_show(entry);
+
+
 
   gtk_container_add(GTK_CONTAINER(page2),vbox);
   gtk_widget_show(vbox);
diff -ur grip-3.2.0.clean/src/grip.h grip-3.2.0/src/grip.h
--- grip-3.2.0.clean/src/grip.h	2004-04-15 19:51:47.000000000 +0200
+++ grip-3.2.0/src/grip.h	2008-08-10 17:23:41.000000000 +0200
@@ -311,6 +311,8 @@
   int edit_num_cpu;
   int mp3nice;
   char mp3_filter_cmd[256];
+  char execute_after_encode[256];
+  char execute_after_encode_params[256];
   gboolean doid3;
   gboolean doid3v2;
   gboolean tag_mp3_only;
diff -ur grip-3.2.0.clean/src/rip.c grip-3.2.0/src/rip.c
--- grip-3.2.0.clean/src/rip.c	2004-04-15 20:21:15.000000000 +0200
+++ grip-3.2.0/src/rip.c	2008-08-10 17:23:41.000000000 +0200
@@ -362,6 +362,37 @@
   }
 }
 
+static void ExecAfterRip(GripInfo *ginfo,EncodeTrack *enc_track)
+{
+  int execpid;
+
+  execpid=fork();
+  
+  if(execpid==0) {
+    CloseStuff(ginfo);
+    GString *args[100];
+    char *char_args[101];
+    int arg;
+
+    MakeTranslatedArgs(ginfo->execute_after_encode_params,args,100,TranslateSwitch,
+		       enc_track,FALSE,&(ginfo->sprefs));
+    ArgsToLocale(args);
+
+    for(arg=0;args[arg];arg++) {
+      char_args[arg+1]=args[arg]->str;
+    }
+
+    char_args[arg+1]=NULL;
+
+    char_args[0]=FindRoot(ginfo->execute_after_encode);
+
+    execv(ginfo->execute_after_encode,char_args);
+
+    LogStatus(ginfo,_("Exec failed\n"));
+    _exit(0);
+  }
+}
+
 static void AddSQLEntry(GripInfo *ginfo,EncodeTrack *enc_track)
 {
   int sqlpid;
@@ -999,6 +1030,7 @@
 		   ginfo->encoded_track[mycpu]);
 
 	  if(ginfo->add_to_db) AddSQLEntry(ginfo,ginfo->encoded_track[mycpu]);
+	  ExecAfterRip(ginfo,ginfo->encoded_track[mycpu]);
 
 	  if(*ginfo->mp3_filter_cmd)
 	    TranslateAndLaunch(ginfo->mp3_filter_cmd,TranslateSwitch,


Index: grip.spec
===================================================================
RCS file: /cvs/extras/rpms/grip/devel/grip.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- grip.spec	26 Jul 2008 21:34:21 -0000	1.22
+++ grip.spec	10 Aug 2008 15:37:14 -0000	1.23
@@ -1,7 +1,7 @@
 Summary: Front-end for CD rippers and Ogg Vorbis encoders
 Name: grip
 Version: 3.2.0
-Release: 20%{?dist}
+Release: 21%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: Applications/Multimedia
@@ -12,6 +12,7 @@
 Patch3: grip.desktop.patch
 Patch4: grip-64bit-fix.patch
 Patch5: grip-3.2.0-lookup.patch
+Patch6: grip-3.2.0-executionpatch.patch
 URL: http://www.nostatic.org/grip/
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: vorbis-tools
@@ -33,6 +34,7 @@
 %patch3
 %patch4
 %patch5 -p1
+%patch6 -p1
 
 %build
 
@@ -94,6 +96,9 @@
 %{_mandir}/man1/*
 
 %changelog
+* Sun Aug 10 2008 Adrian Reber <adrian at lisas.de> - 1:3.2.0-21
+- added "execute command after encode" patch (#457186)
+
 * Sat Jul 26 2008 Adrian Reber <adrian at lisas.de> - 1:3.2.0-20
 - fixed "Grip silently crahses on F8" (#456721)
   (converted non UTF-8 .po files to UTF-8)




More information about the fedora-extras-commits mailing list