Ajout génération .size et .duration pour les fichiers des émissions complètes

This commit is contained in:
Frédéric Couchet 2021-10-05 08:36:45 +02:00 committed by Frédéric Couchet
parent b07342ed84
commit b18b3cf054

View File

@ -285,6 +285,39 @@ sub process {
return 0; 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 . "</ul>\n\n"; $textwebpage = $textwebpage . "</ul>\n\n";