CC-4843: Make listener stats work with SaaS in 2.3.x-saas branch

-fixed
This commit is contained in:
Martin Konecny 2013-01-16 14:05:45 -05:00
parent dbaf7d9b4b
commit 74877b289e
1 changed files with 7 additions and 2 deletions

View File

@ -48,8 +48,13 @@ class ListenerStat(Thread):
def get_icecast_stats(self, ip):
url = 'http://%(host)s:%(port)s/admin/stats.xml' % ip
document = self.get_stream_server_xml(ip, url)
document = None
if "airtime.pro" in ip["host"].lower():
url = 'http://%(host)s:%(port)s/stats.xsl' % ip
document = self.get_stream_server_xml(ip, url)
else:
url = 'http://%(host)s:%(port)s/admin/stats.xml' % ip
document = self.get_stream_server_xml(ip, url)
dom = xml.dom.minidom.parseString(document)
sources = dom.getElementsByTagName("source")