dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 5566c17d95e54c604c47594a694756213972d1c3
parent 8a50ed5098c8656d95fb3b7cac97764c5f99471c
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue,  8 Mar 2022 21:38:58 +0000

suffle tv episodes

Diffstat:
Abin/bin/tvshuf | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/bin/bin/tvshuf b/bin/bin/tvshuf @@ -0,0 +1,14 @@ +#!/bin/sh + +[ $# -eq 0 ] && exit 1 + +tvdir="/media/tv" +series="${tvdir}/$1" +repeat="$2" + +grep ${tvdir} /proc/mounts >/dev/null || exit 1 +[ -d ${series} ] || exit 1 + +for num in $(seq 1 ${repeat}) ; do + mpv $(find ${series} -type f -exec file -N -i -- {} + | sed -n 's!: video/[^:]*$!!p' | shuf -n 1) +done