Clean up .part files, set LC_ALL if unset

This commit is contained in:
2023-04-27 03:39:07 +02:00
parent 29ff106066
commit 28e798af98

View File

@@ -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"
}
f_delete_parts(){
rm -r $directory/*.part
rm -r PSP/$directory/*.part
}
help(){
printf "Usage: $0\n"
exit 1
@@ -21,6 +26,7 @@ nojson(){
saveifs=$IFS
IFS=$'\n'
[ -z $LC_ALL ] && export LC_ALL=en_US.UTF-8
iterations=$(jq -r ".subscriptions | length" < subscriptions.json)
for (( iteration=0; iteration<$iterations; iteration++ ))
@@ -40,6 +46,7 @@ do
[ ! -f "PSP/$directory/$file" ] && \
f_convert-psp "$directory"/"$file"
done
f_delete_parts
done
IFS=$saveifs