Hi all, here is my little contribution for anyone who may mind this useful
Below is a script I use as a cronjob which gets info from the RD database
and exports a cart play report that I then reconcile with my music
scheduler.
This is handy for reconciling RD with your music scheduler provided it has
the capability with the last play date of tracks allowing for better
scheduling of tracks.
It means that if you have scheduled tracks that have not played, the
rotation of those tracks will work better.
The report is setup to look at the MUSIC category and also a CHRISTMAS
category that I have setup, but you can change these to suit your needs.
Also its set to look at the database on localhost with user root and
password as password and saves the text file in /tmp. You can change these
as appropriate.
#! /usr/bin/env bash
# execute some bash scripting commands here
[ -e /tmp/cart-info.txt ] && mv --backup=numbered /tmp/cart-info.txt
/tmp/cart-info.old
mysql RIVENDELL -u root -ppasswd <<SQL_DONE_TAG
SELECT
CUTS.CART_NUMBER, COALESCE(CUTS.LAST_PLAY_DATETIME,'0000-00-00
00:00:00')
INTO
OUTFILE '/tmp/cart-info.txt'
FIELDS TERMINATED by ','
LINES TERMINATED by '\n'
FROM
CUTS
INNER JOIN CART
ON CUTS.CART_NUMBER = CART.NUMBER
WHERE
CART.GROUP_NAME in ('MUSIC','CHRISTMAS');
SQL_DONE_TAG
# end of script
Cheers,
Lee
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev