~mdw
/
dvdrip
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dvdrip-retry-botched-vobs: Process discs in a useful order.
[dvdrip]
/
dvdrip-retry-botched-vobs
diff --git
a/dvdrip-retry-botched-vobs
b/dvdrip-retry-botched-vobs
index
c281b60
..
48dd813
100755
(executable)
--- a/
dvdrip-retry-botched-vobs
+++ b/
dvdrip-retry-botched-vobs
@@
-2,7
+2,7
@@
dev=${DVDRIP_DEVICE-/dev/dvd}
dev=${DVDRIP_DEVICE-/dev/dvd}
-find "$@" -type f -name "*.retry" -print | while IFS= read -r r; do
+find "$@" -type f -name "*.retry" -print |
sort |
while IFS= read -r r; do
iso=${r%.retry}.iso
want_id=$(dvd-id "$iso")
iso=${r%.retry}.iso
want_id=$(dvd-id "$iso")
@@
-13,7
+13,11
@@
find "$@" -type f -name "*.retry" -print | while IFS= read -r r; do
case $id in
"$want_id") break ;;
"$last_wrong") ;;
case $id in
"$want_id") break ;;
"$last_wrong") ;;
- *) echo "No, that's $id -- wanted $want_id..."; last_wrong=$id ;;
+ *)
+ echo "No, that's $id -- wanted $want_id..."
+ last_wrong=$id
+ eject "$dev"
+ ;;
esac
sleep 2
done
esac
sleep 2
done
@@
-29,4
+33,5
@@
find "$@" -type f -name "*.retry" -print | while IFS= read -r r; do
*) echo "Failed! :-("; exit 2 ;;
esac
done
*) echo "Failed! :-("; exit 2 ;;
esac
done
+ eject "$dev"
done
done