From ef54ad932e0f168b3dc827a6d40c449274e1b2b6 Mon Sep 17 00:00:00 2001 From: milaq Date: Mon, 23 Jul 2018 14:34:21 +0200 Subject: [PATCH] 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. --- ycast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ycast.py b/ycast.py index bc01846..a865849 100755 --- a/ycast.py +++ b/ycast.py @@ -46,7 +46,7 @@ class YCastServer(BaseHTTPRequestHandler): xml = self.create_root() for category in sorted(stations, key=str.lower): 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')) elif self.path.startswith('/' + YCAST_LOCATION + '/'): category = url_to_text(self.path[len(YCAST_LOCATION) + 2:].partition('?')[0])