Merge branch '2.4.x'
Conflicts: airtime_mvc/public/js/airtime/showbuilder/builder.js python_apps/pypo/liquidsoap_scripts/fdkaac.liq python_apps/pypo/schedule/pypofetch.py python_apps/pypo/schedule/telnetliquidsoap.py
This commit is contained in:
commit
2a0c9769aa
40 changed files with 3341 additions and 3801 deletions
python_apps/pypo/liquidsoap_scripts
|
@ -1,24 +1,24 @@
|
|||
if bitrate == 24 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 24), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 24, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 32 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 32), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 32, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 48 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 48), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 48, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 64 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 64), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 64, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 96 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 96), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 96, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 128 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 128), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 128, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 160 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 160), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 160, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 192 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 192), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 192, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 224 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 224), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 224, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 256 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 256), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 256, aot="mpeg4_he_aac_v2"), !source))
|
||||
elsif bitrate == 320 then
|
||||
ignore(output_stereo(%fdkaac(bitrate = 320), !source))
|
||||
ignore(output_stereo(%fdkaac(bitrate = 320, aot="mpeg4_he_aac_v2"), !source))
|
||||
end
|
||||
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
def notify(m)
|
||||
#current_media_id := string_of(m['schedule_table_id'])
|
||||
command = "/usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --media-id=#{m['schedule_table_id']} &"
|
||||
log(command)
|
||||
system(command)
|
||||
end
|
||||
|
||||
def notify_queue(m)
|
||||
f = !dynamic_metadata_callback
|
||||
ignore(f(m))
|
||||
notify(m)
|
||||
end
|
||||
|
||||
def notify_stream(m)
|
||||
json_str = string.replace(pattern="\n",(fun (s) -> ""), json_of(m))
|
||||
#if a string has a single apostrophe in it, let's comment it out by ending the string before right before it
|
||||
|
@ -18,12 +23,19 @@ end
|
|||
# A function applied to each metadata chunk
|
||||
def append_title(m) =
|
||||
log("Using stream_format #{!stream_metadata_type}")
|
||||
if !stream_metadata_type == 1 then
|
||||
[("title", "#{!show_name} - #{m['artist']} - #{m['title']}")]
|
||||
elsif !stream_metadata_type == 2 then
|
||||
[("title", "#{!station_name} - #{!show_name}")]
|
||||
|
||||
if list.mem_assoc("mapped", m) then
|
||||
#protection against applying this function twice. It shouldn't be happening
|
||||
#and bug file with Liquidsoap.
|
||||
m
|
||||
else
|
||||
[("title", "#{m['artist']} - #{m['title']}")]
|
||||
if !stream_metadata_type == 1 then
|
||||
[("title", "#{!show_name} - #{m['artist']} - #{m['title']}"), ("mapped", "true")]
|
||||
elsif !stream_metadata_type == 2 then
|
||||
[("title", "#{!station_name} - #{!show_name}"), ("mapped", "true")]
|
||||
else
|
||||
[("title", "#{m['artist']} - #{m['title']}"), ("mapped", "true")]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ default_dj_fade = ref 0.
|
|||
station_name = ref ''
|
||||
show_name = ref ''
|
||||
|
||||
dynamic_metadata_callback = ref fun (s) -> begin () end
|
||||
|
||||
s1_connected = ref ''
|
||||
s2_connected = ref ''
|
||||
s3_connected = ref ''
|
||||
|
@ -47,7 +49,7 @@ def create_source()
|
|||
# the crossfade function controls fade in/out
|
||||
l = crossfade_airtime(l)
|
||||
|
||||
l = on_metadata(notify, l)
|
||||
l = on_metadata(notify_queue, l)
|
||||
sources := list.append([l], !sources)
|
||||
server.register(namespace="queues",
|
||||
"s#{!source_id}_skip",
|
||||
|
@ -70,6 +72,10 @@ create_source()
|
|||
|
||||
queue = add(!sources, normalize=false)
|
||||
|
||||
pair = insert_metadata(queue)
|
||||
dynamic_metadata_callback := fst(pair)
|
||||
queue = snd(pair)
|
||||
|
||||
output.dummy(fallible=true, queue)
|
||||
|
||||
http = input.http_restart(id="http")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue