Hi all,
Back in 2013 Alessio Elmi wrote an awesome little script using Mysql
that makes air play load a log and skip to the correct time. I'm
reposting it here because I just spent nearly an hour trying to find
it. I've amended it slightly but here is what it does:
* Loads the current days log
* Skips (Make Next) to the Cart that should be playing Now
* Starts Playing
* Sets the log mode to automatic.
I use this script on a headless server as the machine that plays when
we're not live with a presenter. You could also use it on studio
machines as a "crash and restart" script. Just make sure your airplay
starts up in manual mode (or without a log loaded so that you won't get
any timed event interference while it skips to the correct place). You
might have to amend the date and Log format to match the name of your
Rivendell Logs. Mine all look like this (today's date): 2015_11_13_LOG
*#!/bin/bash *#Get the date now YYYY_MM_DD
DATE=$(*date* +"%Y_%m_%d")
SUFFIX=_LOG
#Rivendell LOG format: YYYY_MM_DD_LOGLOG=$DATE$SUFFIX #Get the time now as
millisecondsH=$(*date* +"%H")H=$((H*3600000))
M=$(date +"%M")
M=$((M*60000))
S=$(*date* +"%S")
S=$((S*1000))
T=$((H+M+S))
#Rivendell DB Details HOST=your_riv_hostUSER=rduser
PASSWORD=letmein
DATABASE=Rivendell
#Query DB and get the line of the log to skip to QUERY="SELECT ID FROM "$LOG" WHERE START_TIME<="$T" ORDER BY COUNT DESC LIMIT
1;" CART=$(mysql -u$USER -p$PASSWORD -h$HOST $DATABASE -Bse"$QUERY")
#Make Airplay load the log and skip to the correct time *rmlsend* LL\ 1\
$DATE\ -1\!
*rmlsend* MN\ 1\ $CART\!
#Start Playback *rmlsend* PN\ 1\!
#Set Mode to Automatic *rmlsend* PM\ 2\!
--
Wayne Merricks
The Voice Asia
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev