Allow playing multiple files

This commit is contained in:
IamTheFij 2020-11-18 12:39:57 -08:00
parent 5adbcd38be
commit 50897ae465

View File

@ -1,9 +1,11 @@
#! /bin/bash
PLAYDIR=/tmp/beets_play
PLAYDIR="${PLAYDIR:-/tmp/beets_play}"
mkdir -p "$PLAYDIR"
cp "$1" "$PLAYDIR/$(basename "$1")"
cp "$1" "$PLAYDIR/play"
for f in "$@"; do
cp "$f" "$PLAYDIR/$(basename "$f")"
done
caddy file-server --listen :9999 --browse --root "$PLAYDIR"
rm "$PLAYDIR"/*