From eba52f4e39daac4b4b0f14cfe3cb42cbbac4aaf6 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 3 Sep 2011 16:45:47 +0200 Subject: adding mpd stream to streams --- streams/stream.db | 1 + 1 file changed, 1 insertion(+) (limited to 'streams') diff --git a/streams/stream.db b/streams/stream.db index 5efeb9ea..2a71f369 100644 --- a/streams/stream.db +++ b/streams/stream.db @@ -6,3 +6,4 @@ http://somafm.com/illstreet.pls illstreet http://localhost:8000/stream.ogg icecast http://stream2.jungletrain.net:8000 jungletrain http://playlist.tormentedradio.com/tormentedradio.pls tormented +http:/filebitch.shack:8000 mpd -- cgit v1.2.3 From a8150875936a0229d330846590c3211048800c89 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 3 Sep 2011 17:09:34 +0200 Subject: fixed mpd entry --- streams/stream.db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'streams') diff --git a/streams/stream.db b/streams/stream.db index 2a71f369..47ccf7b5 100644 --- a/streams/stream.db +++ b/streams/stream.db @@ -6,4 +6,4 @@ http://somafm.com/illstreet.pls illstreet http://localhost:8000/stream.ogg icecast http://stream2.jungletrain.net:8000 jungletrain http://playlist.tormentedradio.com/tormentedradio.pls tormented -http:/filebitch.shack:8000 mpd +http://filebitch.shack:8000 mpd -- cgit v1.2.3 From 9dcad72bd0b39a3d8dab2b128fe2383b11e49d04 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 9 Sep 2011 19:20:28 +0200 Subject: //streams: start w/o args uses the last stream --- streams/streams | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'streams') diff --git a/streams/streams b/streams/streams index 60a4bfc2..80c654ad 100755 --- a/streams/streams +++ b/streams/streams @@ -1,4 +1,8 @@ #! /bin/bash +set -euf + +stream_file=/tmp/krebs.stream.current + HERE=$(dirname $(readlink -f $0)) URLS=`cat $HERE/stream.db` CURRENT_STREAM="no stream" #will be set when calling `status` @@ -22,7 +26,12 @@ function start() { if echo "$URLS" | while read URL NAME; do if [ "$NAME" = "$REQ" ];then - tmux new-session -s streams -n streams -d "while sleep 1;do mplayer $URL;done" + tmux new-session -s streams -n streams -d " + while sleep 1; do + echo $NAME > $stream_file + mplayer $URL + done + " echo "** $REQ started" exit 1 fi @@ -97,7 +106,7 @@ Examples: case "$1" in start) - start $2 + start ${2-"`test -f $stream_file && cat $stream_file`"} ;; stop) stop -- cgit v1.2.3