diff --git a/tools/radioctl b/tools/radioctl index cc83079..8ad2b35 100644 --- a/tools/radioctl +++ b/tools/radioctl @@ -30,11 +30,16 @@ case $1 in done break ;; + d | duration) + find $radio_dir/music -iname '*.ogg' -exec ffprobe -i "{}" \ + -show_entries format=duration -v quiet -of csv="p=0" \; | + paste -s -d+ - | bc *) echo "f|ilelist - to generate a filelist.html" echo "p|laylist - to generate a playlist 'all'" echo "s|huffle - to shuffle a playlist and store as all-rand" echo "c|onvert DIR - convert all files in DIR to ogg" + echo "d|uration - get total songs' duration" exit ;; esac \ No newline at end of file