I can't take any of the credit for this, but...

Log into the mysql prompt (or write a script and pipe this to mysql):

SELECT COUNT(*) AS Plays, CART_NUMBER, TITLE, ARTIST FROM 
yourstationservicename_SRT WHERE STATION_NAME="playoutcomputername" && 
((CART_NUMBER >=0 AND CART_NUMBER <=75000) OR (CART_NUMBER >=100000 AND 
CART_NUMBER <=300000)) && EVENT_DATETIME > "2013-03-22" && EVENT_DATETIME < 
"2013-03-28" GROUP BY CART_NUMBER ORDER BY Plays DESC LIMIT 50;

A quick explanation
yourstationservicename = the name of the service that your station runs in 
Rivendell
Station_name= the name of the computer which plays out using rdairplay. You may 
have to expand this if you have lots of machines operating the on air play
Cart number: these are ranges which count towards the chart. Our jingles/beds 
etc... reside between 75000 and 100000 so we don't count play of those.
The dates are the chart date range
We call up 50 items (Desc limit) as we have a top 40 and no doubt someone will 
have loaded in a bed/jingle as a music item! At least it helps us spot them.

To make this work in a script:

mysql -u yourmysqlusername -pyourmysqlpassword -h mysqlserveripaddress 
databasename

e.g. mysql -u rduser -ppassword -h 192.168.1.100 Rivendell < 
/home/rduser/scriptasabove.txt



________________________________
 From: Morten Krarup Nielsen <[email protected]>
To: User discussion about the Rivendell Radio Automation System 
<[email protected]> 
Sent: Tuesday, 9 April 2013, 13:30
Subject: [RDD] Generating Airplay-chart
 

Hi.

We want to generate an weekly Airplay Chart to publish to our listeners and the 
record companies.
I guess we're not the first station that want to make this Airplay chart, so 
how do we do this, without me learning PHP and SQL? :-)

Thank you!

Kind regards,

Morten

_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

Reply via email to