Random commits gathered and put into one

-since we had an accidental merge between devel and 2.1.x, I'm rounding
up these changes that need to be in 2.1.x and putting them here.
This commit is contained in:
Martin Konecny 2012-07-09 18:58:22 -04:00
parent b7ca858506
commit aecee0574d
4 changed files with 32 additions and 10 deletions

View file

@ -107,12 +107,28 @@ echo "* Making sure /etc/default/locale is set properly"
set +e
update-locale
cat /etc/default/locale | grep -i "LANG=.*UTF-\?8"
set -e
if [ "$?" != "0" ]; then
echo "non UTF-8 default locale found in /etc/default/locale."
echo -e " * Fail\n"
echo "A non UTF-8 default locale found in /etc/default/locale. Airtime requires
a UTF-8 locale to run. To fix this please do the following:
Ubuntu:
Put line 'en_US.UTF-8 UTF-8' (or similar) without quotes to '/var/lib/locales/supported.d/local',
replacing any existing lines.
A list of supported locales is available in '/usr/share/i18n/SUPPORTED'
Then run 'sudo dpkg-reconfigure locales'
Debian:
Run 'sudo dpkg-reconfigure locales' and use the interface to select 'en_US.UTF-8 UTF-8' (or similar).
On the second page select this new locale as the default.
After these changes have been made simply run install again.
Now exiting install...
"
exit 1
fi
set -e
# Check if airtime exists already
set +e

View file

@ -1,5 +1,5 @@
DELETE FROM cc_pref WHERE keystr = 'system_version';
INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.1.3');
UPDATE cc_show_instances SET time_filled='00:00:00' WHERE time_filled IS NULL;\
UPDATE cc_show_instances SET time_filled='00:00:00' WHERE time_filled IS NULL;
ALTER TABLE cc_subjs ADD COLUMN cell_phone VARCHAR(255);

View file

@ -221,11 +221,17 @@ class AirtimeMetadata:
md['MDATA_KEY_COPYRIGHT'] = self.truncate_to_length(md['MDATA_KEY_COPYRIGHT'], 512)
#end of db truncation checks.
try:
md['MDATA_KEY_BITRATE'] = getattr(file_info.info, "bitrate", 0)
md['MDATA_KEY_SAMPLERATE'] = getattr(file_info.info, "sample_rate", 0)
md['MDATA_KEY_BITRATE'] = file_info.info.bitrate
md['MDATA_KEY_SAMPLERATE'] = file_info.info.sample_rate
md['MDATA_KEY_DURATION'] = self.format_length(file_info.info.length)
md['MDATA_KEY_MIME'] = file_info.mime[0]
#TODO: WHATS A GOOD DEFAULT VALUE???
md['MDATA_KEY_DURATION'] = self.format_length(file_info.info.length)
#TODO: WHATS A GOOD DEFAULT VALUE???
md['MDATA_KEY_MIME'] = file_info.mime[0]
except Exception as e:
self.logger.warn(e)
if "mp3" in md['MDATA_KEY_MIME']:
md['MDATA_KEY_FTYPE'] = "audioclip"

View file

@ -73,7 +73,7 @@ monit_restart() {
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE1
rm -f $PIDFILE1
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
start-stop-daemon --start --background --quiet --chuid $ROOTUSERID:$ROOTUSERID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID \
--nicelevel -15 --make-pidfile --pidfile $PIDFILE1 --startas $DAEMON1