aboutsummaryrefslogtreecommitdiff
path: root/.local/share/bin
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-22 15:11:27 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-22 15:11:27 +0200
commit950a85cabd31b8133a8d39abbb95a0da37a904bc (patch)
tree5a636b6de7ea989c3ed5a4f223d39469777d28ac /.local/share/bin
parente10e370f5d466cd9636985696000e8678b1a8b42 (diff)
added script for quickly launching media player with specific show
Diffstat (limited to '.local/share/bin')
-rwxr-xr-x.local/share/bin/shows12
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
+