aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin/shows
blob: 6bcff016fc549abfdf1144fad2a7c299048e2b48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
media_path="/mnt/media/shows/"
search_term=$1
episode=$2
[ -z $episode ] && episode="1"
season=$3
[ -z $season ] && season="1"

cd $media_path
filename=$(find . -type f | fzf -f$search_term | grep -iE "s0?${season}e0?${episode}" | head -n1)
mpv "$media_path/$filename" & disown