From b18b3cf05423356d76b70408e30f63468d27182c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Couchet?= Date: Tue, 5 Oct 2021 08:36:45 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20g=C3=A9n=C3=A9ration=20.size=20et=20.du?= =?UTF-8?q?ration=20pour=20les=20fichiers=20des=20=C3=A9missions=20compl?= =?UTF-8?q?=C3=A8tes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- podcasts/scripts/make-all-podcasts.pl | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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";