diff --git a/convert-psp b/convert-psp index 148afb6..5f0c631 100755 --- a/convert-psp +++ b/convert-psp @@ -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