]>
code.delx.au - transcoding/blob - identify-disc-mpv
3 if [ -z "$1" -o -z "$2" ]; then
4 echo "Usage: $0 --bluray-device|--dvd-device SOMEDIRECTORY"
10 if [ "$device_param" = "--bluray-device" ]; then
12 elif [ "$device_param" = "--dvd-device" ]; then
15 echo "Unknown device type: $device_param"
30 function get_highest_title
{
32 "$device_param" "$device_path" "${device_scheme}://" \
33 --term-playing-msg='${disc-title-list}TITLE_LIST_END' \
34 |
grep -B2 'TITLE_LIST_END' \
41 "$device_param" "$device_path" "${device_scheme}://${1}" \
42 --term-playing-msg='TITLE_LENGTH=${length}' \
43 |
grep 'TITLE_LENGTH' \
48 highest_title
="$(get_highest_title)"
49 for title
in $
(seq 0 "$highest_title"); do