mirror of
https://git.wownero.com/dsc/ircradio.git
synced 2024-08-15 01:03:15 +00:00
support multiple streams
This commit is contained in:
parent
1cf5b0e79a
commit
5d8caf4d24
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,8 @@ class Radio:
|
|||
@staticmethod
|
||||
async def listeners():
|
||||
data: dict = await Radio.get_icecast_metadata()
|
||||
if isinstance(data, list):
|
||||
data = next(s for s in data if s['server_name'].endswith('wow.ogg'))
|
||||
if not data:
|
||||
return 0
|
||||
return data.get('listeners', 0)
|
||||
|
|
Loading…
Reference in a new issue