Hooks can be used to automate the process of updating database columns
when new audio files are uploaded. A hook command reads the path of an
audio file and output a list of database columns to be updated with
their respective values. Currently, the only supported database tables
are calcms_events and calcms_audio_recordings. Some examples are
included
After the end of a show, the audio recordings are uploaded to a
directory "listen_dir" under a secret name, beginning with the
transmission date "yyyy-mm-dd hh_mm". The directory is available as URL
"listen_url", but must not be listable. In order to gain access to the
recording for 7 days after the show, a check is done to determine
whether the file is available. A random key for the show is stored in
the database if a file matching the date is found in listen_dir. With
this key as a name, a symbolic link to the original audio file is
created. The random name can be used in public documents. If the show
data is read again, the key will be retrieved from the database. File
access can be restricted by the Apache2 handler ListenerAccess.pm. With
it, access to the public symlink is possible for one week.
* remove cache, cache setup is not easy, todays servers do not really
* need it anymore
* add prototypes and fix parameter issues
* suppress redefinition