Added a working 4th stream
This commit is contained in:
parent
1f6f880dad
commit
d61b75f105
5 changed files with 61 additions and 8 deletions
|
@ -10,18 +10,22 @@ output_sound_device_type = "ALSA"
|
|||
s1_output = "icecast"
|
||||
s2_output = "icecast"
|
||||
s3_output = "icecast"
|
||||
s4_output = "icecast"
|
||||
|
||||
s1_enable = true
|
||||
s2_enable = false
|
||||
s3_enable = false
|
||||
s4_enable = false
|
||||
|
||||
s1_type = "ogg"
|
||||
s2_type = "ogg"
|
||||
s3_type = "mp3"
|
||||
s4_type = "mp3"
|
||||
|
||||
s1_bitrate = 128
|
||||
s2_bitrate = 128
|
||||
s3_bitrate = 160
|
||||
s4_bitrate = 160
|
||||
|
||||
###########################################
|
||||
# Logging settings #
|
||||
|
@ -35,31 +39,39 @@ log_file = "/var/log/airtime/pypo-liquidsoap/<script>.log"
|
|||
s1_host = "127.0.0.1"
|
||||
s2_host = "127.0.0.1"
|
||||
s3_host = "127.0.0.1"
|
||||
s4_host = "127.0.0.1"
|
||||
s1_port = 8000
|
||||
s2_port = 8000
|
||||
s3_port = 8000
|
||||
s4_port = 8000
|
||||
s1_user = ""
|
||||
s2_user = ""
|
||||
s3_user = ""
|
||||
s4_user = ""
|
||||
s1_pass = "hackme"
|
||||
s2_pass = "hackme"
|
||||
s3_pass = "hackme"
|
||||
s4_pass = "hackme"
|
||||
|
||||
# Icecast mountpoint names
|
||||
s1_mount = "airtime_128.ogg"
|
||||
s2_mount = "airtime_128.ogg"
|
||||
s3_mount = "airtime_160.mp3"
|
||||
s4_mount = "airtime_160.mp3"
|
||||
|
||||
# Webstream metadata settings
|
||||
s1_url = "http://airtime.sourcefabric.org"
|
||||
s2_url = "http://airtime.sourcefabric.org"
|
||||
s3_url = "http://airtime.sourcefabric.org"
|
||||
s1_description = "Airtime Radio! stream1"
|
||||
s2_description = "Airtime Radio! stream2"
|
||||
s3_description = "Airtime Radio! stream3"
|
||||
s4_url = "http://airtime.sourcefabric.org"
|
||||
s1_description = "Airtime Radio! Stream 1"
|
||||
s2_description = "Airtime Radio! Stream 2"
|
||||
s3_description = "Airtime Radio! Stream 3"
|
||||
s4_description = "Airtime Radio! Stream 4"
|
||||
s1_genre = "genre"
|
||||
s2_genre = "genre"
|
||||
s3_genre = "genre"
|
||||
s4_genre = "genre"
|
||||
|
||||
# Audio stream metadata for vorbis/ogg is disabled by default
|
||||
# due to a number of client media players that disconnect
|
||||
|
|
|
@ -29,9 +29,11 @@ dynamic_metadata_callback = ref fun (s) -> begin () end
|
|||
s1_connected = ref ''
|
||||
s2_connected = ref ''
|
||||
s3_connected = ref ''
|
||||
s4_connected = ref ''
|
||||
s1_namespace = ref ''
|
||||
s2_namespace = ref ''
|
||||
s3_namespace = ref ''
|
||||
s4_namespace = ref ''
|
||||
just_switched = ref false
|
||||
|
||||
%include "ls_lib.liq"
|
||||
|
@ -103,7 +105,7 @@ server.register(namespace="vars",
|
|||
fun (s) -> begin log("vars.bootup_time") time := s s end)
|
||||
server.register(namespace="streams",
|
||||
"connection_status",
|
||||
fun (s) -> begin log("streams.connection_status") "1:#{!s1_connected},2:#{!s2_connected},3:#{!s3_connected}" end)
|
||||
fun (s) -> begin log("streams.connection_status") "1:#{!s1_connected},2:#{!s2_connected},3:#{!s3_connected}:#{!s4_connected}" end)
|
||||
server.register(namespace="vars",
|
||||
"default_dj_fade",
|
||||
fun (s) -> begin log("vars.default_dj_fade") default_dj_fade := float_of_string(s) s end)
|
||||
|
@ -399,6 +401,18 @@ if s3_enable == true then
|
|||
s3_connected, s3_description, s3_channels)
|
||||
end
|
||||
|
||||
if s4_enable == true then
|
||||
if s4_output == 'shoutcast' then
|
||||
s4_namespace := "shoutcast_stream_4"
|
||||
else
|
||||
s4_namespace := s4_mount
|
||||
end
|
||||
server.register(namespace=!s4_namespace, "connected", fun (s) -> begin log("#{!s4_namespace}.connected") !s4_connected end)
|
||||
output_to(s4_output, s4_type, s4_bitrate, s4_host, s4_port, s4_pass,
|
||||
s4_mount, s4_url, s4_name, s4_genre, s4_user, s, "4",
|
||||
s4_connected, s4_description, s4_channels)
|
||||
end
|
||||
|
||||
command = "/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --liquidsoap-started &"
|
||||
log(command)
|
||||
system(command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue