Clean up .part files, set LC_ALL if unset
This commit is contained in:
@@ -4,6 +4,11 @@ f_convert-psp(){
|
|||||||
ffmpeg -y -i "$1" -flags +bitexact -vcodec libx264 -profile:v baseline -level 3.0 -s 480x272 -r 29.97 -b:v 384k -acodec aac -b:a 96k -ar 48000 -f psp -strict -2 "PSP/$1"
|
ffmpeg -y -i "$1" -flags +bitexact -vcodec libx264 -profile:v baseline -level 3.0 -s 480x272 -r 29.97 -b:v 384k -acodec aac -b:a 96k -ar 48000 -f psp -strict -2 "PSP/$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
f_delete_parts(){
|
||||||
|
rm -r $directory/*.part
|
||||||
|
rm -r PSP/$directory/*.part
|
||||||
|
}
|
||||||
|
|
||||||
help(){
|
help(){
|
||||||
printf "Usage: $0\n"
|
printf "Usage: $0\n"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -21,6 +26,7 @@ nojson(){
|
|||||||
|
|
||||||
saveifs=$IFS
|
saveifs=$IFS
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
[ -z $LC_ALL ] && export LC_ALL=en_US.UTF-8
|
||||||
iterations=$(jq -r ".subscriptions | length" < subscriptions.json)
|
iterations=$(jq -r ".subscriptions | length" < subscriptions.json)
|
||||||
|
|
||||||
for (( iteration=0; iteration<$iterations; iteration++ ))
|
for (( iteration=0; iteration<$iterations; iteration++ ))
|
||||||
@@ -40,6 +46,7 @@ do
|
|||||||
[ ! -f "PSP/$directory/$file" ] && \
|
[ ! -f "PSP/$directory/$file" ] && \
|
||||||
f_convert-psp "$directory"/"$file"
|
f_convert-psp "$directory"/"$file"
|
||||||
done
|
done
|
||||||
|
f_delete_parts
|
||||||
done
|
done
|
||||||
|
|
||||||
IFS=$saveifs
|
IFS=$saveifs
|
||||||
|
Reference in New Issue
Block a user