chore(playout): clean comments
This commit is contained in:
parent
0eced23e4e
commit
aed90d835f
|
@ -30,8 +30,8 @@ def append_title(m) =
|
|||
log("Using message format #{message_format()}")
|
||||
|
||||
if list.mem_assoc("mapped", m) then
|
||||
#protection against applying this function twice. It shouldn't be happening
|
||||
#and bug file with Liquidsoap.
|
||||
# protection against applying this function twice. It shouldn't be happening and bug
|
||||
# file with Liquidsoap.
|
||||
m
|
||||
else
|
||||
if message_format() == "1" then
|
||||
|
@ -62,9 +62,9 @@ def transition(a,b) =
|
|||
)
|
||||
end
|
||||
|
||||
# we need this function for special transition case(from default to queue)
|
||||
# we don't want the trasition fade to have effect on the first song that would
|
||||
# be played switching out of the default(silent) source
|
||||
# we need this function for special transition case(from default to queue) we don't want
|
||||
# the trasition fade to have effect on the first song that would be played switching out
|
||||
# of the default(silent) source
|
||||
def transition_default(a,b) =
|
||||
log("transition called...")
|
||||
if !just_switched then
|
||||
|
@ -85,15 +85,12 @@ def transition_default(a,b) =
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
# Define a transition that fades out the
|
||||
# old source, adds a single, and then
|
||||
# plays the new source
|
||||
# Define a transition that fades out the old source, adds a single, and then plays the
|
||||
# new source
|
||||
def to_live(old,new) =
|
||||
# Fade out old source
|
||||
old = fade.final(old)
|
||||
# Compose this in sequence with
|
||||
# the new source
|
||||
# Compose this in sequence with the new source
|
||||
sequence([old,new])
|
||||
end
|
||||
|
||||
|
@ -202,33 +199,6 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
|
|||
end
|
||||
end
|
||||
|
||||
# Add a skip function to a source
|
||||
# when it does not have one
|
||||
# by default
|
||||
#def add_skip_command(s)
|
||||
# # A command to skip
|
||||
# def skip(_)
|
||||
# # get playing (active) queue and flush it
|
||||
# l = list.hd(server.execute("queue.secondary_queue"))
|
||||
# l = string.split(separator=" ",l)
|
||||
# list.iter(fun (rid) -> ignore(server.execute("queue.remove #{rid}")), l)
|
||||
#
|
||||
# l = list.hd(server.execute("queue.primary_queue"))
|
||||
# l = string.split(separator=" ", l)
|
||||
# if list.length(l) > 0 then
|
||||
# source.skip(s)
|
||||
# "Skipped"
|
||||
# else
|
||||
# "Not skipped"
|
||||
# end
|
||||
# end
|
||||
# # Register the command:
|
||||
# server.register(namespace="source",
|
||||
# usage="skip",
|
||||
# description="Skip the current song.",
|
||||
# "skip",fun(s) -> begin log("source.skip") skip(s) end)
|
||||
#end
|
||||
|
||||
def clear_queue(s)
|
||||
source.skip(s)
|
||||
end
|
||||
|
@ -242,9 +212,6 @@ def get_dynamic_source_id() =
|
|||
string_of(!web_stream_id)
|
||||
end
|
||||
|
||||
#cc-4633
|
||||
|
||||
|
||||
# NOTE
|
||||
# A few values are hardcoded and may be dependent:
|
||||
# - the delay in gracetime is linked with the buffer duration of input.http
|
||||
|
@ -286,11 +253,6 @@ def input.http_restart(~id,~initial_url="http://dummy/url")
|
|||
"OK"
|
||||
end)
|
||||
|
||||
# Dummy output should be useless if HTTP stream is meant
|
||||
# to be listened to immediately. Otherwise, apply it.
|
||||
#
|
||||
# output.dummy(fallible=true,source)
|
||||
|
||||
source
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
boot_timestamp = interactive.string("boot_timestamp", string_of(gettimeofday()))
|
||||
|
||||
#Dynamic source list
|
||||
#dyn_sources = ref []
|
||||
web_stream_enabled = ref false
|
||||
web_stream_id = ref '-1'
|
||||
|
||||
|
@ -99,23 +97,6 @@ server.register(namespace="dynamic_source",
|
|||
"get_id",
|
||||
fun (s) -> begin log("dynamic_source.get_id") get_dynamic_source_id() end)
|
||||
|
||||
#server.register(namespace="dynamic_source",
|
||||
# description="Start a new dynamic source.",
|
||||
# usage="start <uri>",
|
||||
# "read_start",
|
||||
# fun (uri) -> begin log("dynamic_source.read_start") begin_stream_read(uri) end)
|
||||
#server.register(namespace="dynamic_source",
|
||||
# description="Stop a dynamic source.",
|
||||
# usage="stop <id>",
|
||||
# "read_stop",
|
||||
# fun (s) -> begin log("dynamic_source.read_stop") stop_stream_read(s) end)
|
||||
|
||||
#server.register(namespace="dynamic_source",
|
||||
# description="Stop a dynamic source.",
|
||||
# usage="stop <id>",
|
||||
# "read_stop_all",
|
||||
# fun (s) -> begin log("dynamic_source.read_stop") destroy_dynamic_source_all() end)
|
||||
|
||||
default = amplify(id="silence_src", 0.00001, noise())
|
||||
|
||||
def map_message_offline(m) =
|
||||
|
@ -260,10 +241,6 @@ else
|
|||
s
|
||||
end
|
||||
|
||||
|
||||
# Attach a skip command to the source s:
|
||||
#add_skip_command(s)
|
||||
|
||||
server.register(namespace="streams",
|
||||
description="Stop Master DJ source.",
|
||||
usage="master_dj_stop",
|
||||
|
|
Loading…
Reference in New Issue