aboutsummaryrefslogtreecommitdiff
path: root/.scripts/movies
blob: a1e3990a6cfa84319557e470f0939e7ccbd4784e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/env bash
#ssh server ls /mnt/Movies | dmenu | xargs -i -exec mpv "sftp://server:/mnt/Movies/{}"

watch() {
	echo "Watch with $1"
	path="$1/$(ssh server ls -p \"$1\" | dmenu)"
	if [[ "$path" =~ '/'$ ]]; then
		watch "$path"
	elif [[ "$path" =~ 'list'$ ]]; then
		mpv --playlist=sftp://server:"$path"
	else
		mpv sftp://server:"$path"
	fi
}

watch /mnt/Movies