mirror of
https://github.com/sanderfoobar/ircradio.git
synced 2025-01-26 20:24:35 +01:00
support multiple streams
This commit is contained in:
parent
1cf5b0e79a
commit
5d8caf4d24
@ -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 New Issue
Block a user