setup/destination: higher-than

This commit is contained in:
Vincent Riquer 2013-06-19 02:35:27 +02:00
parent b4d7c9d9f0
commit 46a43828e4

View File

@ -386,9 +386,29 @@ setupDestination() {
comeagain
destinationfrequency["$destination"]=$value
cat <<-EODesc
Higher-Than (bitrate, integer):
Only reencode files with bitrates higher then <bitrate>kbps. This
only applies if sample-rate, channel count and of course format are
equal. If unset, only files with bitrates equal to that of the
target will be copied (actually, hardlinking will be attempted
first).
As Ogg Vorbis target quality is not defined by its bitrate, Ogg
Vorbis files will always be reencoded if unset.
EODesc
comeagain() {
:
read \
-e \
${destinationmaxbps["$destination"]+-i${destinationmaxbps["$destination"]}}\
-p'Higher-Than: ' \
value
if ! [[ $value =~ $expr ]]
then
echo "Invalid higher-than bitrate value: $value" >&2
comeagain
fi
}
comeagain
destinationmaxbps[$destination]="$value"
}