19 lines
380 B
Shell
Executable file
19 lines
380 B
Shell
Executable file
#!/bin/sh
|
|
if ! getextattr user duration-secs "$@" >/dev/null 2>&1
|
|
then
|
|
"$(dirname "$0")/../libexec/probe-media.sh" "$@"
|
|
fi
|
|
|
|
getextattr user duration-secs "$@" | awk '
|
|
BEGIN { FS="\t"; }
|
|
{
|
|
if (length($2) > 0) {
|
|
secs=int($2 + 0.5);
|
|
mins=int(secs/60);
|
|
secs=secs%60;
|
|
hours=int(mins/60);
|
|
mins=mins%60;
|
|
printf "%d:%02d:%02d %s\n", hours, mins, secs, $1;
|
|
}
|
|
}
|
|
'
|