]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
change encode with find null terminated
authorBastian Dehn <hhaalo@arcor.de>
Sun, 27 Sep 2026 08:12:09 +0000 (10:12 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 27 Sep 2026 08:12:09 +0000 (10:12 +0200)
src/lib/mp3.sh
src/lib/opus.sh
src/lib/vorbis.sh

index 5baa0848b9f6a908cc1a2d984e87585f0f77fe85..964a4aace8d8605118d263ce64145ba1c9b9ccdc 100644 (file)
@@ -114,11 +114,12 @@ mp3_encode_flac()
 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 {}
index 5846421ba31c86a6f87882334fbd85bbad1b1c41..061c6bd34d7e816bc38d48184e2f3a58018f750c 100644 (file)
@@ -39,11 +39,12 @@ opus_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 {}
index a93dd726ac4c2f3c5b3ba96264df06da877ecd7a..03f06f6f4298110c9f18bd0a03c051c1c3930545 100644 (file)
@@ -104,13 +104,21 @@ vorbis_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 "{}"
 }