diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-09-28 09:45:27 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-09-28 09:45:27 +0000 |
commit | ae42673240fa8d53cbc812e59b9319e04e1af196 (patch) | |
tree | b65856885fe0e4fa18c4aa501b85349ebe8c6ea7 | |
parent | d455c5cee29e36f375ed3a593338d3676d7d3bf8 (diff) |
Set URL and email default values. No need to have them in each meta
file.
-rwxr-xr-x | tools/gen_frikanalen_video.pl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/gen_frikanalen_video.pl b/tools/gen_frikanalen_video.pl index 99a7179..c3b540c 100755 --- a/tools/gen_frikanalen_video.pl +++ b/tools/gen_frikanalen_video.pl @@ -114,6 +114,11 @@ sub usage { sub read_meta { my $ret; + + # Set some default values + $ret->{'url'} = 'http://www.nuug.no/'; + $ret->{'email'} = 'sekretariat@nuug.no'; + open M, "$metafile" or die "Cannot open $metafile for read :$!"; while (<M>) { chomp; @@ -239,14 +244,14 @@ sub normalize_sound { $f = "$normalize_cmd -a $soundlevel_dbfs $workdir/sound.wav"; if ( !runcmd($f) ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } $f = "ffmpeg -i $workdir/sound.wav -ac 2 -acodec copy -i $dvfile -vcodec copy -map 1:0 -map 0.0 -f dv -y $new_dvfile"; - if ( !runcmd($f) ) { + if ( !runcmd($f) ) { if ( -f "$workdir/_normAAAAAA" ) { print "$normalize_cmd was not able to move $workdir/_normAAAAAA to $workdir/sound.wav.\n"; print "Forcing by deleting $workdir/sound.wav first.\n"; - if ( !runcmd("rm $workdir/sound.wav") ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } - if ( !runcmd("mv $workdir/_normAAAAAA $workdir/sound.wav") ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } + if ( !runcmd("rm $workdir/sound.wav") ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } + if ( !runcmd("mv $workdir/_normAAAAAA $workdir/sound.wav") ) { die "Failed to execute system command in" . (caller(0))[3] ."\n"; } } else { - die "Failed to execute system command in" . (caller(0))[3] ."\n"; + die "Failed to execute system command in" . (caller(0))[3] ."\n"; } } return $new_dvfile; |