CC-3130: Disabling a Shoutcast stream causes the service type to revert back to Icecast
This happens because we use same field in the db to store whether stream is disabled, and which type is it (Icecast/Shoutcast). Thus when we disable a stream, we forget about the fact that it was set to Shoutcast before. Fixed by separating out the enable/disable state from stream type. Whether a stream is enabled/disabled is stored in new fields sx_enable. Stream type is stored in the old fields, sx_output.
This commit is contained in:
parent
85b8209db9
commit
53aecd1c00
7 changed files with 39 additions and 30 deletions
|
@ -7,8 +7,12 @@
|
|||
###########################################
|
||||
output_sound_device = false
|
||||
s1_output = "icecast"
|
||||
s2_output = "disabled"
|
||||
s3_output = "disabled"
|
||||
s2_output = "icecast"
|
||||
s3_output = "icecast"
|
||||
|
||||
s1_enable = true
|
||||
s2_enable = false
|
||||
s3_enable = false
|
||||
|
||||
s1_type = "ogg"
|
||||
s2_type = "ogg"
|
||||
|
|
|
@ -54,18 +54,18 @@ if output_sound_device then
|
|||
ignore(out(s))
|
||||
end
|
||||
|
||||
if s1_output != "disabled" then
|
||||
if s1_enable == true then
|
||||
#output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, s)
|
||||
output_to(s1_output, s1_type, s1_bitrate, s1_host, s1_port, s1_pass, s1_mount, s1_url, s1_description, s1_genre, s1_user, s, "1")
|
||||
end
|
||||
|
||||
if s2_output != "disabled" then
|
||||
if s2_enable == true then
|
||||
#output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, s)
|
||||
output_to(s2_output, s2_type, s2_bitrate, s2_host, s2_port, s2_pass, s2_mount, s2_url, s2_description, s2_genre, s2_user, s, "2")
|
||||
|
||||
end
|
||||
|
||||
if s3_output != "disabled" then
|
||||
if s3_enable == true then
|
||||
#output_to(output_type, type, bitrate, host, port, pass, mount_point, url, description, genre, s)
|
||||
output_to(s3_output, s3_type, s3_bitrate, s3_host, s3_port, s3_pass, s3_mount, s3_url, s3_description, s3_genre, s3_user, s, "3")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue