origargs=("$0" "$@")
cmdline=(mpv -fs)
debug=
+log=y
unset pretend printfile
while [ "${1:0:1}" = - ]; do
shift
case "$a" in
-h)
- echo "usage: planime [-fdhtC] [-A PLAYER-ARGS... ;] [-s PAR VAL] [--] [NAME-QUAL] [EP|.] [TYPE-QUAL]" >&2
+ echo "usage: planime [-fdhtCL] [-A PLAYER-ARGS... ;] [-s PAR VAL] [--] [NAME-QUAL] [EP|.] [TYPE-QUAL]" >&2
exit 0
;;
-d)
-C)
pretend=y
;;
+ -L)
+ log=
+ ;;
-A)
while :; do
if [ $# -lt 1 ]; then
echo "$file"
else
if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi
+ if [ "$log" = y ]; then
+ if [ -d $HOME/.anime ]; then
+ echo "$(date) $(basename "$file")" >>$HOME/.anime/plog
+ fi
+ fi
"${cmdline[@]}" "$file"
if [ "$nextep" = y ]; then