Show bit-depth

This commit is contained in:
Vincent Riquer 2013-09-28 00:29:25 +02:00
parent 5e1f531e3b
commit d541282f27

View File

@ -61,6 +61,7 @@ do
'-M') show+=(types) ;;
'-p') show+=(performers) ;;
'-s') show+=(rates) ;;
'-B') show+=(depths) ;;
'-t') show+=(titles) ;;
'-y') show+=(years) ;;
@ -82,6 +83,7 @@ done
-b Average bitrate
-C Channels
-s Sample rate
-B Bits per sample
-m Mofification time
-M Format
@ -195,21 +197,23 @@ do
info="${show[index]}"
locallength="${length[index]:=50}"
case $info in
albumartists) info="Album artist" ;;
albums) info="Album" ;;
artists) info="Artist" ;;
bitrates) info="Bitrate" ;;
composers) info="Composer" ;;
channelss) info="Channels" ;;
discs) info="Disc" ;;
path) info="Directory name" ;;
genres) info="Genre" ;;
oldtimestamp) info="Last modified" ;;
types) info="Format" ;;
performers) info="Performer" ;;
rates) info="Sample rate" ;;
titles) info="Title" ;;
years) info="Date" ;;
albumartists) info='Album artist' ;;
albums) info='Album' ;;
artists) info='Artist' ;;
bitrates) info='Bitrate' ;;
depths) info='Bit depth' ;;
channelss) info='Channels' ;;
composers) info='Composer' ;;
count) info='#' ;;
discs) info='Disc' ;;
path) info='Directory name' ;;
genres) info='Genre' ;;
oldtimestamp) info='Last modified' ;;
types) info='Format' ;;
performers) info='Performer' ;;
rates) info='Sample rate' ;;
titles) info='Title' ;;
years) info='Date' ;;
esac
printtmp="${info:0:$locallength}"
until (( ${#printtmp} == locallength ))
@ -228,6 +232,7 @@ SELECT
tags.bitrate,
tags.channels,
tags.rate,
tags.depth,
source_files.last_change,
mime_types.mime_text,
tags.albumartist,
@ -270,6 +275,8 @@ do
rest="${rest#*::AtOM:SQL:Sep::}"
rate="${rest%%::AtOM:SQL:Sep::*}"
rest="${rest#*::AtOM:SQL:Sep::}"
depth="${rest%%::AtOM:SQL:Sep::*}"
rest="${rest#*::AtOM:SQL:Sep::}"
timestamp="${rest%%::AtOM:SQL:Sep::*}"
timestamp="${timestamp%%.*}"
rest="${rest#*::AtOM:SQL:Sep::}"
@ -340,6 +347,16 @@ do
rates+="${rates+,}$rate"
fi
fi
if [ -n "$depth" ] && ! [[ $depths =~ $expr1"$depth"$expr2 ]]
then
if [ -n "$depths" ] \
&& (( depth < ${depths%%,*} ))
then
depths="$depth,$depths"
else
depths+="${depths+,}$depth"
fi
fi
if ! [[ $types =~ $expr1"$type"$expr2 ]]
then
[ -z "$types" ] \
@ -418,6 +435,7 @@ do
unset bitrates
channelss="$channels"
rates="$rate"
depths="$depth"
types="$type"
albumartists="$albumartist"
albums="$album"