Send query result to channel

This commit is contained in:
elpatron68 2019-07-27 18:30:10 +02:00
parent fa3243b77d
commit 27d10e593a
2 changed files with 4 additions and 4 deletions

View File

@ -371,7 +371,7 @@ class MumbleBot:
logging.info('Found query parameter: ' + parameter) logging.info('Found query parameter: ' + parameter)
stations = getstations_byname(parameter) stations = getstations_byname(parameter)
for s in stations: for s in stations:
msg += "<br />" + s msg += "<br />" + s['id'] + s['stationname'] + ': '
self.send_msg(msg, text) self.send_msg(msg, text)
elif command == var.config.get('command', 'help'): elif command == var.config.get('command', 'help'):

View File

@ -1,4 +1,4 @@
from rbRadios import RadioBrowser from radios import RadioBrowser
rb = RadioBrowser() rb = RadioBrowser()
@ -8,7 +8,7 @@ def getstations_byname(query):
for st in results: for st in results:
try: try:
url = rb.playable_station(st['id'])['url'] url = rb.playable_station(st['id'])['url']
station = {'stationname': st['name'], 'url': url} station = {'stationname': st['name'], 'url': url, 'id':st['id']}
stations.append(station) stations.append(station)
except: except:
pass pass