[RDD] Check for newest program

Kristen Eisenberg kristen.eisenberg at yahoo.com
Sat Apr 14 09:58:28 EDT 2012

We have a similar situation with Pacifica's Free Speech Radio News (FSRN).
Their downloadable file is available at 4pm-ish CST, and we play it at 5pm
CST.  They post their downloadable file with a different URL based upon the
current day's date, which confounds RDCatch.  We wrote a shell script to do
what we need.

N.B.  I have not plumbed the depths of RDCatch, so we may indeed have
duplicated something that RDCatch can already do with aplomb, yet remains
beyond our current grasp of it.

Our shell script properly formats the download URL to include the current
date, then downloads it with curl and RDImports it into the cart.

The first thing the script does, is delete any existing cut in the FSRN
cart.  Then it RDImports a cut of .08 seconds of silence into that cart. * *The
point of first inserting the .08 seconds of silence into the cart is, should
the FSRN download fail or prove invalid, the cart will play .08 seconds of
silence, then the log continues with automated programming.  We don't want
to repeat old programs.  The script then fetches the FSRN file.  If the
download was successful, it verifies that it's an .mp3 file (instead of an
HTML redirect or error page), checks the length for sanity, then performs an
md5sum to make sure that's it's unique to the previous day's download.  If
that succeeds, then it removes the cut of .08 seconds of silence from the
cart and RDImports the downloaded FSRN file into it.  The script also
redirect standard output and error to files, which are emailed to admins.
This script is run as a cron job.

Kristen Eisenberg
Billige Flüge
Marketing GmbH
Emanuelstr. 3,
10317 Berlin
Telefon: +49 (33)
utebachmeier at
- Billige Flüge vergleichen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rivendellaudio.org/pipermail/rivendell-dev/attachments/20120414/3d24198c/attachment.htm 

More information about the Rivendell-dev mailing list