Compare commits
No commits in common. "94c387faba4b88296470b2713dd9c2a53119c78a" and "da4462b46ad94254c9c650b5143ded1abd41db8b" have entirely different histories.
94c387faba
...
da4462b46a
@ -67,14 +67,12 @@ mkdir -pv "$NEW" "$INT"
|
|||||||
## Convert Media ##
|
## Convert Media ##
|
||||||
|
|
||||||
echo "* Ensure all files are mp3."
|
echo "* Ensure all files are mp3."
|
||||||
find "$OLD" -type f ! -name "*".mp3 | sort | while read file; do
|
find "$OLD" -type f ! -name "*".mp3 | while read file; do
|
||||||
echo "** Working on '$file'."
|
echo "** Working on '$file'."
|
||||||
ffmpeg -y -nostdin -hide_banner -loglevel quiet -i "$file" "$file".converted.mp3
|
ffmpeg -nostdin -hide_banner -loglevel quiet -i "$file" "$file".converted.mp3
|
||||||
status="$?"
|
status="$?"
|
||||||
if [[ $status != 0 ]]; then
|
if [[ $status != 0 ]]; then
|
||||||
echo "*** FAILED: Exited with status '$status'."
|
echo "*** FAILED: Exited with status '$status'."
|
||||||
echo "**** To troubleshoot, try running this:"
|
|
||||||
echo "ffmpeg -i '$file' '$file'.converted.mp3"
|
|
||||||
else
|
else
|
||||||
echo "*** Success!"
|
echo "*** Success!"
|
||||||
fi
|
fi
|
||||||
@ -197,7 +195,7 @@ function migrate_music {
|
|||||||
# Prefer Artist, then Band, then Albumartist
|
# Prefer Artist, then Band, then Albumartist
|
||||||
grandparent=""
|
grandparent=""
|
||||||
if [[ -n $album ]]; then
|
if [[ -n $album ]]; then
|
||||||
grandparent="$artist"
|
grandparent="$album"
|
||||||
elif [[ -n $band ]]; then
|
elif [[ -n $band ]]; then
|
||||||
grandparent="$band"
|
grandparent="$band"
|
||||||
elif [[ -n $album_artist ]]; then
|
elif [[ -n $album_artist ]]; then
|
||||||
@ -219,7 +217,7 @@ function migrate_music {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "* Moving INTERIM files to NEW."
|
echo "* Moving INTERIM files to NEW."
|
||||||
find "$INT" -name "*".mp3 | sort | while read file; do
|
find "$INT" -name "*".mp3 | while read file; do
|
||||||
migrate_music "$file" mv
|
migrate_music "$file" mv
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -227,6 +225,6 @@ echo "** Done with INTERIM, deleting."
|
|||||||
rm -rfv "$INT"
|
rm -rfv "$INT"
|
||||||
|
|
||||||
echo "* Copying OLD files to NEW."
|
echo "* Copying OLD files to NEW."
|
||||||
find "$OLD" -name "*".mp3 | sort | while read file; do
|
find "$OLD" -name "*".mp3 | while read file; do
|
||||||
migrate_music "$file" cp
|
migrate_music "$file" cp
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user