This commit is contained in:
thek4n 2026-02-19 22:10:42 +03:00
parent d511b9dedc
commit 5414d49b01
2 changed files with 15 additions and 6 deletions

View File

@ -1,16 +1,18 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
if [ "${1}" = lofi ]; then channel="${1:-}"
if [ "${channel}" = lofi ]; then
url='https://live.hunter.fm/lofi_low' url='https://live.hunter.fm/lofi_low'
elif [ "${1}" = trance ]; then elif [ "${channel}" = trance ]; then
url='http://ubuntu.hbr1.com:19800/trance.ogg' url='http://ubuntu.hbr1.com:19800/trance.ogg'
elif [ "${1}" = salsa ]; then elif [ "${channel}" = salsa ]; then
url='https://latinasalsa.ice.infomaniak.ch/latinasalsa.mp3' url='https://latinasalsa.ice.infomaniak.ch/latinasalsa.mp3'
elif [ "${1}" = kfai ]; then elif [ "${channel}" = kfai ]; then
url='https://kfai.broadcasttool.stream/kfai-1' url='https://kfai.broadcasttool.stream/kfai-1'
else else
echo "don't know ${1}" 1>&2 echo "don't know \"${channel}\": lofi/trance/salsa/kfai" 1>&2
exit 1 exit 1
fi fi

View File

@ -1,4 +1,11 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
exec mpv --no-video --ytdl-format=worstaudio "${@}" playlist="${1:-}"
shift || true
if [ -z "${playlist}" ]; then
playlist="${HOME}/Music"
fi
exec mpv --shuffle --no-video --ytdl-format=worstaudio "${@}" -- "${playlist}"