Message as html table
This commit is contained in:
parent
2ed6475887
commit
81569cdaaa
@ -397,13 +397,10 @@ class MumbleBot:
|
|||||||
codec = rstation[0]['codec']
|
codec = rstation[0]['codec']
|
||||||
bitrate = rstation[0]['bitrate']
|
bitrate = rstation[0]['bitrate']
|
||||||
genre = rstation[0]['tags']
|
genre = rstation[0]['tags']
|
||||||
imageurl = rstation[0]['favicon']
|
|
||||||
homepage = rstation[0]['homepage']
|
homepage = rstation[0]['homepage']
|
||||||
logging.info(f'hp: {homepage}')
|
msg = f'Start playing radio station:'
|
||||||
logging.info(f'img: {imageurl}')
|
msg += '<table><tr><th>ID</th><th>Station Name</th><th>Genre</th><th>Codec/Bitrate</th><th>Country</th><th>Homepage</th></tr><tr>' + \
|
||||||
msg = f'Start playing radio station: {stationname} ({codec}/{bitrate} kbit, Country: {country}, Genre: {genre})'
|
f'<td>{parameter}</td><td>{stationname}</td><td>{genre}</td><td>{codec}, {bitrate}</td><td>{country}</td><td>{homepage}</td></tr></table>'
|
||||||
if homepage and imageurl:
|
|
||||||
msg += f'<a href="{homepage}"><img src="{imageurl}"></a>'
|
|
||||||
logging.debug(f'Play radio station {stationname}')
|
logging.debug(f'Play radio station {stationname}')
|
||||||
self.send_msg(msg, text)
|
self.send_msg(msg, text)
|
||||||
url = radiobrowser.geturl_byid(parameter)
|
url = radiobrowser.geturl_byid(parameter)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user