From 3139a82a825a9eaab8192078dc1ba3fcaed2bfc7 Mon Sep 17 00:00:00 2001 From: milaq Date: Wed, 28 Aug 2019 22:37:57 +0200 Subject: [PATCH] Some Yamaha AVRs have a whitelist built in Let's find out what is whitelisted. 1st try: Just use the radioyamaha.vtuner.com baseurl without any rewrites --- ycast/server.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/ycast/server.py b/ycast/server.py index bf68059..f48caf1 100644 --- a/ycast/server.py +++ b/ycast/server.py @@ -275,16 +275,5 @@ def get_station_icon(): def vtuner_redirect(url): - url = 'http://radioyamaha.vtuner.com/setupapp/yamaha/mp3/YradioSample.mp3' - response = redirect(url, code='302 Object moved') - headers = dict(response.headers) - headers.update({'Content-Type': 'text/html', - 'Connection': 'close', - 'X-Powered-By': 'ASP.NET', - 'Server': 'Microsoft-IIS/7.5', - 'Cache-Control': 'private'}) - response.headers = headers - response.data = "Object moved\n" \ - "

Object Moved

This object may be found " \ - "here.\n" % url - return response \ No newline at end of file + url = 'http://radioyamaha.vtuner.com/foo.mp3' + return redirect(url, code=302)