AST_CRON_audio_compress_2.pl delete originals

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

AST_CRON_audio_compress_2.pl delete originals

Postby Acidshock » Sat Mar 10, 2012 1:06 pm

Out of curiousity why do we not delete the originals during this script action? Is it for maybe wanting to record in different formats besides the original? Maybe we should add a delete option to delete the original. If what I am doing is considered alright I will write that option.

I have a system that fills the recordings up almost daily... I added a `rm "$dir2/$ALLfile"`; so that it will delete live and it seems to work just fine. Just making sure I am not doing anything that may cause problems.

VERSION: 2.4-349a
BUILD: 111122-1333
Asterisk 1.4
Suse 10.3
Redux 3.1.13


Code: Select all
                        if ($MP3 > 0)
                                {
                                $MP3file = $FILES[$i];
                                $MP3file =~ s/-all\.wav/-all.mp3/gi;

                                if ($DB) {print "|$recording_id|$ALLfile|$MP3file|     |$SQLfile|\n";}

                                `$lamebin -b 16 -m m --silent "$dir2/$ALLfile" "$dir2/MP3/$MP3file"`;
                                `rm "$dir2/$ALLfile"`;
                                $stmtA = "UPDATE recording_log set location='http://$server_ip/RECORDINGS/MP3/$MP3file' where recording_id='$recording_id';";
                                        if($DBX){print STDERR "\n|$stmtA|\n";}
                                $affected_rows = $dbhA->do($stmtA); #  or die  "Couldn't execute query:|$stmtA|\n";
                                }
Acidshock
 
Posts: 428
Joined: Wed Mar 03, 2010 3:19 pm

Postby mflorell » Sat Mar 10, 2012 6:25 pm

We had too many cases where "something went wrong" and having the original recordings meant they could be run through the compress process again after the issue had been fixed.
mflorell
Site Admin
 
Posts: 18338
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby Acidshock » Mon Mar 12, 2012 1:32 pm

Makes perfect sense. Think people would want the option to turn that feature off? Is it worth me taking the time to add an optional switch?
Acidshock
 
Posts: 428
Joined: Wed Mar 03, 2010 3:19 pm

Postby mflorell » Mon Mar 12, 2012 2:03 pm

I think if there was an optional switch that there are people that would use it. If you have the time to do that please go ahead and post it to the Issue Tracker.
mflorell
Site Admin
 
Posts: 18338
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 45 guests