Skip to content

Commit

Permalink
support for query in 'Search' argument in station search
Browse files Browse the repository at this point in the history
Some devices use capital S in Search argument
  • Loading branch information
yay6 committed Oct 12, 2020
1 parent 8060780 commit 9943632
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ycast/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def vtuner_redirect(url):
def upstream(path):
if request.args.get('token') == '0':
return vtuner.get_init_token()
if request.args.get('search'):
if request.args.get('search') or request.args.get('Search'):
return station_search()
if 'statxml.asp' in path and request.args.get('id'):
return get_station_info()
Expand Down Expand Up @@ -238,6 +238,8 @@ def radiobrowser_popular():
methods=['GET', 'POST'])
def station_search():
query = request.args.get('search')
if not query:
query = request.args.get('Search')
if not query or len(query) < 3:
page = vtuner.Page()
page.add(vtuner.Display("Search query too short"))
Expand Down

0 comments on commit 9943632

Please sign in to comment.