15 lines
434 B
Plaintext
15 lines
434 B
Plaintext
|
#!/bin/sh
|
||
|
for i in $(seq 1 60); do
|
||
|
if [ "$(find . -name "$i *" | wc -l)" = 2 ]; then
|
||
|
first_track="$(find . -name "$i *" | head -n1)"
|
||
|
last_track="$(find . -name "$i *" | tail -n1)"
|
||
|
first_acoustid="$(exiftool "$first_track" | rg Acoustid)"
|
||
|
last_acoustid="$(exiftool "$last_track" | rg Acoustid)"
|
||
|
if [ "$first_acoustid" = "$last_acoustid" ]; then
|
||
|
if [ "$first_track" != "$last_track" ]; then
|
||
|
rm "$first_track"
|
||
|
fi
|
||
|
fi
|
||
|
fi
|
||
|
done
|