diff --git a/lib/setup/setupDestination b/lib/setup/setupDestination index e618841..bd3c152 100644 --- a/lib/setup/setupDestination +++ b/lib/setup/setupDestination @@ -386,9 +386,29 @@ setupDestination() { comeagain destinationfrequency["$destination"]=$value cat <<-EODesc + + Higher-Than (bitrate, integer): + Only reencode files with bitrates higher then 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" }