[encode_all] clean up

This commit is contained in:
Luke Tidd 2023-11-18 14:58:57 -05:00
parent d8c6d6bba9
commit 5c73a8523f
Signed by: luke
GPG Key ID: 75D6600BEF4E8E8F

View File

@ -148,12 +148,15 @@ function encode() {
fi
}
echo going to process
echo starting processing
find "$src_library" -type f -name '*.flac' -print0 | env_parallel -P 0 -0 --bar encode {}
echo done processing
echo removing obsolete opus files
diff -d --suppress-common-lines <(cat "$temp_dir"/* | sort -V) <(find "$output_dir" -type f | sort -V) | grep -E '^>' | sed 's/^> //' | while read old_opus; do
rm -f "$old_opus"
done
rm -rf "$temp_dir"
echo deleting any empty directories
find "$output_dir" -empty -type d -delete