Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
denise 2013-05-15 15:32:43 -04:00
commit 58a806a607
4 changed files with 46 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# Script for generating nightly Airtime snapshot packages
# Run from the directory containg the files checked out from git
VERSION=2.3.0~$(date "+%Y%m%d")
VERSION=2.4.0~$(date "+%Y%m%d")
BUILDDEST=/tmp/airtime-${VERSION}/
DEBDIR=`pwd`/debian
@ -23,7 +23,7 @@ cd ${BUILDDEST} || exit
# Set the version of the snapshot package
sed -i "1s:(2.3.0-1):(${VERSION}):g" debian/changelog
sed -i "1s:(2.4.0-1):(${VERSION}):g" debian/changelog
# FIXES for 2.3.0 #############

View File

@ -19,6 +19,16 @@ def load_definitions():
t.depends('length')
t.translate(lambda k: format_length(k['length']))
with md.metadata('MDATA_KEY_CUE_IN') as t:
t.default(u'0.0')
t.depends('cuein')
t.translate(lambda k: format_length(k['cuein']))
with md.metadata('MDATA_KEY_CUE_OUT') as t:
t.default(u'0.0')
t.depends('cueout')
t.translate(lambda k: format_length(k['cueout']))
with md.metadata('MDATA_KEY_MIME') as t:
t.default(u'')
t.depends('mime')

View File

@ -45,8 +45,12 @@ airtime2mutagen = {
"MDATA_KEY_URL" : "website",
"MDATA_KEY_ISRC" : "isrc",
"MDATA_KEY_COPYRIGHT" : "copyright",
"MDATA_KEY_CUE_IN" : "cuein",
"MDATA_KEY_CUE_OUT" : "cueout",
}
#doesn't make sense for us to write these values to a track's metadata
mutagen_do_not_write = ["MDATA_KEY_CUE_IN", "MDATA_KEY_CUE_OUT"]
# Some airtime attributes are special because they must use the mutagen object
# itself to calculate the value that they need. The lambda associated with each
@ -111,7 +115,8 @@ class Metadata(Loggable):
song_file = mutagen.File(path, easy=True)
exceptions = [] # for bad keys
for airtime_k, airtime_v in md.iteritems():
if airtime_k in airtime2mutagen:
if airtime_k in airtime2mutagen and \
airtime_k not in mutagen_do_not_write:
# The unicode cast here is mostly for integers that need to be
# strings
if airtime_v is None: continue

View File

@ -1,11 +1,38 @@
#!/bin/bash -e
debug="f"
showhelp () {
echo "Usage: airtime-liquidsoap [options]
--help|-h Displays usage information.
--debug|-d Print error messages to console"
}
set -- $(getopt -l help,debug "hd" "$@")
while [ $# -gt 0 ]
do
case "$1" in
(-h|--help) showhelp; exit 0;;
(-d|--debug) debug="t";;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
(*) break;;
esac
shift
done
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
. ${virtualenv_bin}activate
export HOME="/var/tmp/airtime/pypo/"
api_client_path="/usr/lib/airtime/"
ls_path="/usr/bin/airtime-liquidsoap --verbose -f -d"
if [ $debug = "t" ]; then
ls_path="/usr/bin/airtime-liquidsoap --verbose -f"
else
ls_path="/usr/bin/airtime-liquidsoap --verbose -f -d"
fi
ls_param="/usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq"
export PYTHONPATH=${api_client_path}