diff options
-rwxr-xr-x | .local/share/bin/shows | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/share/bin/shows b/.local/share/bin/shows new file mode 100755 index 0000000..6bcff01 --- /dev/null +++ b/.local/share/bin/shows @@ -0,0 +1,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 + |