mirror of
https://github.com/sanderfoobar/ircradio.git
synced 2025-01-27 12:44:17 +01:00
support multiple streams
This commit is contained in:
parent
1cf5b0e79a
commit
5d8caf4d24
@ -150,6 +150,8 @@ class Radio:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
async def listeners():
|
async def listeners():
|
||||||
data: dict = await Radio.get_icecast_metadata()
|
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:
|
if not data:
|
||||||
return 0
|
return 0
|
||||||
return data.get('listeners', 0)
|
return data.get('listeners', 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user