Merge 4157ff8a4f
into f349a2686c
This commit is contained in:
commit
948c5c9344
2 changed files with 11 additions and 0 deletions
|
@ -155,3 +155,11 @@ def get_stations_by_votes(limit=DEFAULT_STATION_LIMIT):
|
|||
if SHOW_BROKEN_STATIONS or get_json_attr(station_json, 'lastcheckok') == 1:
|
||||
stations.append(Station(station_json))
|
||||
return stations
|
||||
|
||||
|
||||
def click_vote(uid):
|
||||
clickvote_json = request('url/' + str(uid))
|
||||
if clickvote_json:
|
||||
logging.debug("radio-browser replied: %s", get_json_attr(clickvote_json, 'message'))
|
||||
else:
|
||||
logging.error('clickvote did not work')
|
||||
|
|
|
@ -24,6 +24,7 @@ PATH_RADIOBROWSER_POPULAR = 'popular'
|
|||
|
||||
station_tracking = False
|
||||
my_stations_enabled = False
|
||||
enable_clickvote = False
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
|
@ -282,6 +283,8 @@ def get_station_info():
|
|||
if station_tracking:
|
||||
vtuner_station.set_trackurl(request.host_url + PATH_ROOT + '/' + PATH_PLAY + '?id=' + vtuner_station.uid)
|
||||
vtuner_station.icon = request.host_url + PATH_ROOT + '/' + PATH_ICON + '?id=' + vtuner_station.uid
|
||||
if enable_clickvote and generic.get_stationid_prefix(station.id) == 'RB':
|
||||
radiobrowser.click_vote(generic.get_stationid_without_prefix(station.id))
|
||||
page = vtuner.Page()
|
||||
page.add(vtuner_station)
|
||||
page.set_count(1)
|
||||
|
|
Loading…
Add table
Reference in a new issue