Ajout de la génération des fichiers .size (taille du fichier podcast) et .duration
(durée du fichier podcast). Ces fichiers sont nécessaires pour le script d'import des fichiers JSON permettant de faciliter la création de la page consacrée à l'émission sur le nouveau site libreavous.org.
This commit is contained in:
parent
50463297d5
commit
a6c588d481
@ -197,6 +197,40 @@ sub process {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# generate .size
|
||||||
|
my $command = "du -b $target_name |awk '{print $1}' > $target_name.size";
|
||||||
|
if($dryrun) {
|
||||||
|
print "$command\n";
|
||||||
|
} else {
|
||||||
|
my @ret = `$command`;
|
||||||
|
if($?) {
|
||||||
|
print "Error while generation size of $target_name\n";
|
||||||
|
if($verbose) {
|
||||||
|
print Dumper @ret;
|
||||||
|
print Dumper $data;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# generate duration
|
||||||
|
# my $command = "ffprobe $target_name -show_entries format=duration -sexagesimal 2> /dev/null |grep duration |sed '1,\$s/duration=//' > $target_name.duration";
|
||||||
|
my $command = "mediainfo --Inform='General;%Duration/String3%' $target_name > $target_name.duration";
|
||||||
|
if($dryrun) {
|
||||||
|
print "$command\n";
|
||||||
|
} else {
|
||||||
|
my @ret = `$command`;
|
||||||
|
if($?) {
|
||||||
|
print "Error while generation duration of $target_name\n";
|
||||||
|
if($verbose) {
|
||||||
|
print Dumper @ret;
|
||||||
|
print Dumper $data;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user