createindex show file count

This commit is contained in:
Vincent Riquer 2013-09-28 00:31:56 +02:00
parent d541282f27
commit b5c6d052c6

View File

@ -64,6 +64,7 @@ do
'-B') show+=(depths) ;; '-B') show+=(depths) ;;
'-t') show+=(titles) ;; '-t') show+=(titles) ;;
'-y') show+=(years) ;; '-y') show+=(years) ;;
'-#') show+=(count) ;;
'-T') timeformat="$OPTARG" ;; '-T') timeformat="$OPTARG" ;;
'-o') output="$1" '-o') output="$1"
@ -80,6 +81,7 @@ done
cat <<-EOHelp cat <<-EOHelp
No output specified! No output specified!
-f Path -f Path
-# File count
-b Average bitrate -b Average bitrate
-C Channels -C Channels
-s Sample rate -s Sample rate
@ -144,6 +146,9 @@ printline() {
'oldtimestamp') 'oldtimestamp')
info=$(printDate ${!info}) info=$(printDate ${!info})
;; ;;
'count')
info=$(printf %${locallength}d $count)
;;
'path') 'path')
while [[ $path =~ / ]] while [[ $path =~ / ]]
do do
@ -317,7 +322,8 @@ do
esac esac
if [[ $dir == $olddir ]] if [[ $dir == $olddir ]]
then then
(( $bitrate )) && (( count++ , bitrates+=bitrate )) (( count++ ))
(( $bitrate )) && (( bitrates+=bitrate ))
(( ((
oldtimestamp = ( oldtimestamp = (
timestamp > oldtimestamp timestamp > oldtimestamp
@ -446,7 +452,8 @@ do
performers="$performer" performers="$performer"
titles="$title" titles="$title"
years="$year" years="$year"
(( bitrate )) && (( count=1 , bitrates=bitrate )) count=1
(( bitrate )) && (( bitrates=bitrate ))
oldmimetype=$mimetype oldmimetype=$mimetype
oldrate=$rate oldrate=$rate
oldtimestamp=$timestamp oldtimestamp=$timestamp