Add copy_extension
This commit is contained in:
parent
ed0191e450
commit
b38138667a
8
atom
8
atom
@ -634,6 +634,14 @@ do
|
||||
decodeFile
|
||||
getDestDir
|
||||
getDestFile
|
||||
for copy_ext in "${destinationcopyext[@]}"
|
||||
do
|
||||
if [[ $filename =~ '.*\.'$copy_ext'$' ]]
|
||||
then
|
||||
copied=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if (( copied ))
|
||||
then
|
||||
copyFiles_matching
|
||||
|
||||
@ -185,6 +185,9 @@ getConfigDestination() {
|
||||
'copy_mime-type')
|
||||
destinationcopymime[$destination]="${destinationcopymime[$destination]:+${destinationcopymime[$destination]}|}$value"
|
||||
;;
|
||||
'copy_extension')
|
||||
destinationcopyext[$destination]="${destinationcopyext[$destination]:+${destinationcopyext[$destination]}|}$value"
|
||||
;;
|
||||
'higher-than')
|
||||
expr='^[0-9]*$'
|
||||
if ! [[ $value =~ $expr ]]
|
||||
|
||||
@ -52,6 +52,9 @@ printConfig() {
|
||||
| | |}"
|
||||
[ -n "${destinationcopymime["$destination"]}" ] \
|
||||
&& echo " |Copied mime-types|${destinationcopymime["$destination"]//\|/
|
||||
| | |}"
|
||||
[ -n "${destinationcopyext["$destination"]}" ] \
|
||||
&& echo " |Copied extensions|${destinationcopyext["$destination"]//\|/
|
||||
| | |}"
|
||||
done
|
||||
}|column -t -s'|'
|
||||
|
||||
@ -207,6 +207,17 @@ bitrate ${destinationquality["$destination"]}
|
||||
done
|
||||
cat <<-EOCfg
|
||||
|
||||
# * copy_extension <extension>: Same as skip_extension, except that files
|
||||
# matching will be copied as-is to the destination.
|
||||
EOCfg
|
||||
destinationcopyext["$destination"]="${destinationcopyext["$destination"]}|"
|
||||
while [[ ${destinationcopyext["$destination"]} =~ \| ]]
|
||||
do
|
||||
echo $'copy_extension\t\t'"${destinationcopyext["$destination"]%%|*}"
|
||||
destinationcopyext["$destination"]="${destinationcopyext["$destination"]#*|}"
|
||||
done
|
||||
cat <<-EOCfg
|
||||
|
||||
# * channels <number>: Files with more than <number> channels will be
|
||||
# downmixed. Useful if you create files for telephony music-on-hold.
|
||||
EOCfg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user