Radiobrowser: Limit search results
This commit is contained in:
parent
ce32358149
commit
ed6baa692e
|
@ -49,10 +49,10 @@ def get_station_by_id(uid):
|
||||||
return Station(station_json[0])
|
return Station(station_json[0])
|
||||||
|
|
||||||
|
|
||||||
def search(name):
|
def search(name, limit=DEFAULT_STATION_LIMIT):
|
||||||
stations = []
|
stations = []
|
||||||
stations_json = request('stations/search?order=name&reverse=false&bitrateMin=' +
|
stations_json = request('stations/search?order=name&reverse=false&bitrateMin=' +
|
||||||
str(MINIMUM_BITRATE) + '&name=' + str(name))
|
str(MINIMUM_BITRATE) + '&limit=' + str(limit) + '&name=' + str(name))
|
||||||
for station_json in stations_json:
|
for station_json in stations_json:
|
||||||
stations.append(Station(station_json))
|
stations.append(Station(station_json))
|
||||||
return stations
|
return stations
|
||||||
|
|
Loading…
Reference in a new issue