[ create a new paste ] login | about

Link: http://codepad.org/BgAGNsTZ    [ raw code | fork ]

Python, pasted on Dec 29:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

while IFS= read -rd ''  path; do
    cd "$path" && {
        echo "Found m4a audio in: $path"
        echo " Converting to ogg ..."
        if track2track -t ogg -q 10 -j 4 *.m4a; then
            echo " Verifying ..."
            if trackverify -j 4 *.ogg; then
                echo "OK. Deleting *.m4a"
                rm -f -v *.m4a
            else
                echo "ERR - Verification Failed"
            fi
        fi
    }
done < <(find /media/music -type f -name "*.m4a" -printf "%h\0" | sort -zu)


Create a new paste based on this one


Comments: