use liquidsoap's metadata.on_air to detect sound change

This commit is contained in:
bkfox
2017-07-24 19:23:18 +02:00
parent 97e5945b7d
commit 280864768b
2 changed files with 23 additions and 4 deletions

View File

@ -101,6 +101,7 @@ class Streamer:
if source.rid == rid),
self.current_source
)
self.current_source.metadata = data
def push(self, config = True):
"""
@ -233,6 +234,11 @@ class Source:
"""
Connector to Liquidsoap server
"""
metadata = None
"""
Dict of file's metadata given by Liquidsoap. Set by Stream when
fetch()ing
"""
@property
def id(self):
@ -344,6 +350,8 @@ class Source:
self.rid = data.get('rid')
self.current_sound = data.get('initial_uri')
# TODO: get metadata
def push(self):
"""
Update data relative to the source on the external program.