diff --git a/podcasts/scripts/make-all-podcasts.pl b/podcasts/scripts/make-all-podcasts.pl index 6aaf98c..8b2f99b 100755 --- a/podcasts/scripts/make-all-podcasts.pl +++ b/podcasts/scripts/make-all-podcasts.pl @@ -285,6 +285,39 @@ sub process { return 0; } } + # duration + my $command = "mediainfo --Inform=\"Audio;%Duration/String3%\" $source_name.$format > $source_name.$format.duration"; + if($dryrun) { + print "$command\n"; + } else { + my @ret = `$command`; + if($?) { + print "Error while generation duration of $source_name.$format\n"; + if($verbose) { + print Dumper @ret; + print Dumper $data; + } + return 0; + } + } + + # size + my $command = "du -b $source_name.$format |awk '{print $1}' > $source_name.$format.size"; + if($dryrun) { + print "$command\n"; + } else { + my @ret = `$command`; + if($?) { + print "Error while generation size of $source_name.$format\n"; + if($verbose) { + print Dumper @ret; + print Dumper $data; + } + return 0; + } + } + + } $textwebpage = $textwebpage . "\n\n";