117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
def update_streams(self, cat, search=""):
# there is actually just a single category to download,
# all else are virtual
if (cat == "all"):
#-- get data
yp = http.get(self.base_url + self.yp, 1<<22, feedback=self.parent.status)
#-- extract
l = []
for entry in xml.dom.minidom.parseString(yp).getElementsByTagName("entry"):
bitrate = self.bitrate(self.x(entry, "bitrate"))
if conf.xiph_min_bitrate and bitrate and bitrate >= int(conf.xiph_min_bitrate):
l.append({
"title": str(self.x(entry, "server_name")),
"url": str(self.x(entry, "listen_url")),
"format": self.mime_fmt(str(self.x(entry, "server_type"))[6:]),
|
|
>
|
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
def update_streams(self, cat, search=""):
# there is actually just a single category to download,
# all else are virtual
if (cat == "all"):
#-- get data
yp = http.get(self.base_url + self.yp)
#-- extract
l = []
__print__( dbg.DATA, "xml.dom.minidom parses yp.xml" )
for entry in xml.dom.minidom.parseString(yp).getElementsByTagName("entry"):
bitrate = self.bitrate(self.x(entry, "bitrate"))
if conf.xiph_min_bitrate and bitrate and bitrate >= int(conf.xiph_min_bitrate):
l.append({
"title": str(self.x(entry, "server_name")),
"url": str(self.x(entry, "listen_url")),
"format": self.mime_fmt(str(self.x(entry, "server_type"))[6:]),
|