do not redirect to listen_port
the initial request arrives at port 80 either way. also, in case we are not listening on all interfaces and/or firewall rules are in the way this leads to the receiver not querying an accessible url.
This commit is contained in:
parent
bbc4e55e55
commit
ef54ad932e
2
ycast.py
2
ycast.py
|
@ -46,7 +46,7 @@ class YCastServer(BaseHTTPRequestHandler):
|
||||||
xml = self.create_root()
|
xml = self.create_root()
|
||||||
for category in sorted(stations, key=str.lower):
|
for category in sorted(stations, key=str.lower):
|
||||||
self.add_dir(xml, category,
|
self.add_dir(xml, category,
|
||||||
VTUNER_DNS + ':' + str(listen_port) + '/' + YCAST_LOCATION + '/' + text_to_url(category))
|
VTUNER_DNS + '/' + YCAST_LOCATION + '/' + text_to_url(category))
|
||||||
self.wfile.write(bytes(etree.tostring(xml).decode('utf-8'), 'utf-8'))
|
self.wfile.write(bytes(etree.tostring(xml).decode('utf-8'), 'utf-8'))
|
||||||
elif self.path.startswith('/' + YCAST_LOCATION + '/'):
|
elif self.path.startswith('/' + YCAST_LOCATION + '/'):
|
||||||
category = url_to_text(self.path[len(YCAST_LOCATION) + 2:].partition('?')[0])
|
category = url_to_text(self.path[len(YCAST_LOCATION) + 2:].partition('?')[0])
|
||||||
|
|
Loading…
Reference in a new issue