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