Browse Source

Add Drone Zone and DRY out some mpv invocations.

master
Dan Helfman 2 months ago
parent
commit
d435a7899b
  1. 33
      play-by-number

33
play-by-number

@ -21,7 +21,15 @@ apply_quiet_hours () {
}
stream_song () {
subsonic-cli -c subsonic-cli.cfg stream -p id $1 | mpv --no-video --no-input-terminal -
subsonic-cli -c subsonic-cli.cfg stream -p id "$1" | mpv --no-video --no-input-terminal - &
}
stream_radio() {
mpv --no-video --no-input-terminal "$1" &
}
play_local() {
mpv --no-video --no-input-terminal "$1" &
}
trap kill_music_processes EXIT
@ -32,22 +40,23 @@ while [ true ] ; do
hour=$(TZ="America/Los_Angeles" date +"%H")
if [[ $hour -ge 21 ]] || [[ $hour -le 7 ]] ; then
mpv --no-video --no-input-terminal media/beep.mp3 & # error beep
mpv --no-video --no-input-terminal media/beep.mp3 & # error beep
continue
fi
kill_music_processes
case $song_number in
1) mpv --no-video --no-input-terminal https://somafm.com/poptron.pls & ;; # Poptron
2) stream_song 05211b7eb16eca0729307459ad31056a & ;; # What does the fox say
3) stream_song 2d526af565131fceaab63bf970df49ea & ;; # Bananaphone
4) stream_song 6b35d311b9bba0d6f6de654a02963849 & ;; # The Duck Song
5) stream_song 20ab5ea1d53aead4ad99bd7c50b2040b & ;; # The Duck Song 2
6) stream_song ef44e283de5509b11e4422c441da2951 & ;; # The Duck Song 3
7) stream_song 3a26a5950b11886cd50d2f05d9c244f3 & ;; # Fire Truck
8) stream_song c6c5040d29c9eaaaf11f30f5415eab5b & ;; # Raining Tacos
9) stream_song a0e145806d461cf7bc98a668a40db5b8 & ;; # I Am a Gummy Bear
*) mpv --no-video --no-input-terminal media/beep.mp3 & ;; # error beep
0) stream_radio https://somafm.com/dronezone.pls ;; # Drone Zone
1) stream_radio https://somafm.com/poptron.pls ;; # Poptron
2) stream_song 05211b7eb16eca0729307459ad31056a ;; # What does the fox say
3) stream_song 2d526af565131fceaab63bf970df49ea ;; # Bananaphone
4) stream_song 6b35d311b9bba0d6f6de654a02963849 ;; # The Duck Song
5) stream_song 20ab5ea1d53aead4ad99bd7c50b2040b ;; # The Duck Song 2
6) stream_song ef44e283de5509b11e4422c441da2951 ;; # The Duck Song 3
7) stream_song 3a26a5950b11886cd50d2f05d9c244f3 ;; # Fire Truck
8) stream_song c6c5040d29c9eaaaf11f30f5415eab5b ;; # Raining Tacos
9) stream_song a0e145806d461cf7bc98a668a40db5b8 ;; # I Am a Gummy Bear
*) play_local media/beep.mp3 ;; # error beep
esac
done

Loading…
Cancel
Save