Hi,
We don't use RLM (did not find out that functionnality when first
deploying Rivendell and thus solved the problem otherwise) :
We have a bash script listening for "now data" sent by rdairplay on port
6666.
It takes care of every "title info" application we need (website, RDS,
icecast stream, logging).
For the logging part :
#!/bin/bash
# nowAndNextUpload.sh
WPATH="/home/studio/scripts/"
while true; do
read RAWDATA
# treat input string (some applications hate utf-8 characters)
ARTIST=$(echo $RAWDATA | cut -d"-" -f1)
TITLE=$(echo $RAWDATA | cut -d"-" -f2)
ARTIST=${ARTIST//&/ and }
TITLE=${TITLE//&/ and }
ARTIST=$(echo "$ARTIST" | iconv -f utf8 -t ascii//TRANSLIT)
TITLE=$(echo "$TITLE" | iconv -f utf8 -t ascii//TRANSLIT)
ARTMAJ=`echo $ARTIST | tr 'a-z' 'A-Z'`
TITLEMAJ=`echo $TITLE | tr 'a-z' 'A-Z'`
#rdailplay sends the info multiple times, thus the condition
if [ ! "$TITLE" = "$PREVTITLE" ]; then
# create xml file with currently playing song
echo "<nowPlaying>" > ${WPATH}nowPlaying.xml
echo "<artist><![CDATA[" >> ${WPATH}nowPlaying.xml
echo $ARTIST >> ${WPATH}nowPlaying.xml
echo "]]></artist>" >> ${WPATH}nowPlaying.xml
echo "<title><![CDATA[" >> ${WPATH}nowPlaying.xml
echo $TITLE >> ${WPATH}nowPlaying.xml
echo "]]></title>" >> ${WPATH}nowPlaying.xml
echo "</nowPlaying>" >> ${WPATH}nowPlaying.xml
# append title to daily log with playing starttime
date=$(date +"%Y-%m-%d")
dateh=$(date +"%T")
nline="${dateh} ${ARTIST} - ${TITLE}"
echo $nline >> ${WPATH}${date}_airplay.log
# upload files
FTPU="ftpUser"
FTPPWD="ftpPassword"
FTPS="ftpUrl"
FTPF="destinationFolder"
AIRF="${WPATH}${date}_airplay.log"
ncftpput -u $FTPU -p $FTPPWD $FTPS $FTPF $AIRF
PREVARTIST=$ARTIST
PREVTITLE=$TITLE
fi
done
The script is run permanently in a screen on the rdairplay machine with
this command:
nc -l -u -p 6666 | /home/studio/scripts/nowAndNextUpload.sh
On the website part you just have to write the script you want to do
whatever you need with the data (ie. display now playing, search form
for listeners to find a title they heard, etc…)
You could also probably use the reports but i must admit i never really
understood how those work and how to generate them automatically, seems
less practical to me for that particular use.
Hope it helps.
On 03/23/2015 05:42 PM, Albert Bruc wrote:
Hi,
I'm searching a way to have a global playlist of played songs and shows
for each days and print them on my website
any ideas ?
_______________________________________________
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
Rivendell-dev@lists.rivendellaudio.org
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev