#!/usr/bin/env bash set -euo pipefail # Play the disc's feature straight from the ISO (or a BDMV folder) with mpv. # # mpv links libbluray and plays Blu-ray *titles/playlists* directly. It does NOT # run BD-J -- there is no menu, no Xlet, no Java involved. This is purely "open # the disc and watch the movie", and unlike the VLC/BD-J path it Just Works with # no JVM or cache setup. Use scripts/run-vlc.sh if you want the BD-J menu. # # Pass a path to override the default (an .iso image or a BDMV folder). ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" TARGET="${1:-$ROOT_DIR/build/adjustments.iso}" if [[ ! -e "$TARGET" ]]; then echo "Missing disc target: $TARGET" >&2 echo "Run: make" >&2 exit 1 fi if [[ -d "$TARGET" ]]; then DEVICE="$(cd "$TARGET" && pwd)" else DEVICE="$(cd "$(dirname "$TARGET")" && pwd)/$(basename "$TARGET")" fi # bd://longest plays the main title; --bluray-device points at the image/folder. exec mpv --bluray-device="$DEVICE" "bd://longest"