From 950a85cabd31b8133a8d39abbb95a0da37a904bc Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 22 Apr 2021 15:11:27 +0200 Subject: added script for quickly launching media player with specific show --- .local/share/bin/shows | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .local/share/bin/shows (limited to '.local/share/bin/shows') 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 + -- cgit v1.2.3