From b637365f55aa02f4803e2ac5dd48030ab29a5e7e Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Fri, 18 Jan 2013 15:58:00 -0500 Subject: [PATCH] add some missing statements in the sql upgrade script --- install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql | 7 +++++++ python_apps/pypo/listenerstat.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql index 0b03410b5..d7ea9f8b8 100644 --- a/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql +++ b/install_minimal/upgrades/airtime-2.3.0/data/upgrade.sql @@ -4,6 +4,13 @@ INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.3.0'); INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('off_air_meta', 'Airtime - offline', 'string'); INSERT INTO cc_pref("keystr", "valstr") VALUES('enable_replay_gain', 1); +INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_user', '', 'string'); +INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s1_admin_pass', '', 'string'); +INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s2_admin_user', '', 'string'); +INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s2_admin_pass', '', 'string'); +INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s3_admin_user', '', 'string'); +INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s3_admin_pass', '', 'string'); + --Make sure that cc_music_dir has a trailing '/' and cc_files does not have a leading '/' UPDATE cc_music_dir SET directory = directory || '/' where id in (select id from cc_music_dirs where substr(directory, length(directory)) != '/'); UPDATE cc_files SET filepath = substring(filepath from 2) where id in (select id from cc_files where substring(filepath from 1 for 1) = '/') diff --git a/python_apps/pypo/listenerstat.py b/python_apps/pypo/listenerstat.py index dd006b9e3..e6a272703 100644 --- a/python_apps/pypo/listenerstat.py +++ b/python_apps/pypo/listenerstat.py @@ -109,7 +109,7 @@ class ListenerStat(Thread): def push_stream_stats(self, stats): self.api_client.push_stream_stats(stats) - + def update_listener_stat_error(self, stream_id, error): keyname = '%s_listener_stat_error' % stream_id data = {keyname: error} @@ -126,7 +126,7 @@ class ListenerStat(Thread): stats = self.get_stream_stats(stream_parameters["stream_params"]) self.logger.debug(stats) - + if not stats: self.logger.error("Not able to get listener stats") else: