CC-3224: "On-the-fly" stream rebroadcasting
- Live source is created when only both port and mount point are specified
This commit is contained in:
parent
30901aa0d6
commit
1ebe3d1812
5 changed files with 16 additions and 8 deletions
|
@ -373,7 +373,7 @@ class AirTimeApiClient(ApiClientInterface):
|
|||
|
||||
url = url.replace("%%api_key%%", self.config["api_key"])
|
||||
url = url.replace("%%username%%", username)
|
||||
url = url.replace("%%password%%", hashlib.md5(password).hexdigest())
|
||||
url = url.replace("%%password%%", password)
|
||||
|
||||
req = urllib2.Request(url)
|
||||
response = urllib2.urlopen(req).read()
|
||||
|
|
|
@ -54,10 +54,16 @@ def check_client(user,password) =
|
|||
end
|
||||
end
|
||||
|
||||
live = input.harbor(harbor_input_mount_point, port=harbor_input_port, auth=check_client)
|
||||
|
||||
s = fallback(track_sensitive=false, [live, queue, default])
|
||||
def configure_live(harbor_input_port, harbor_input_mount_point) =
|
||||
if harbor_input_port != 0 and harbor_input_mount_point != "" then
|
||||
live = input.harbor(harbor_input_mount_point, port=harbor_input_port, auth=check_client)
|
||||
fallback(track_sensitive=false, [live, queue, default])
|
||||
else
|
||||
fallback(track_sensitive=false, [queue, default])
|
||||
end
|
||||
end
|
||||
|
||||
s = configure_live(harbor_input_port, harbor_input_mount_point)
|
||||
s = on_metadata(notify, s)
|
||||
s = crossfade(s)
|
||||
# Attach a skip command to the source s:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue