mp3_encode()
{
local work_path="$1"
- find "$work_path" -name '*.flac' \
- | sort \
+ find "$work_path" -name '*.flac' -print0 \
+ | sort --zero-terminated \
| parallel \
--will-cite \
--ungroup \
+ --null \
--eta \
--progress \
mp3_encode_flac {}
opus_encode()
{
local work_path="$1"
- find "$work_path" -name '*.flac' \
- | sort \
+ find "$work_path" -name '*.flac' -print0 \
+ | sort --zero-terminated \
| parallel \
--will-cite \
--ungroup \
+ --null \
--eta \
--progress \
opus_encode_flac {}
vorbis_encode()
{
local work_path="$1"
- find "$work_path" -name '*.jpg' \
- | sort \
- | parallel --will-cite --ungroup \
+ find "$work_path" -name '*.jpg' -print0 \
+ | sort --zero-terminated \
+ | parallel \
+ --will-cite \
+ --ungroup \
+ --null \
vorbis_cover_to_metadata {}
- find "$work_path" -name '*.flac' \
- | sort \
- | parallel --will-cite --ungroup --eta --progress \
+ find "$work_path" -name '*.flac' -print0 \
+ | sort --zero-terminated \
+ | parallel \
+ --will-cite \
+ --ungroup \
+ --null \
+ --eta \
+ --progress \
vorbis_encode_flac "{}"
}