-web streaming enabled in liquidsoap script.

-liquisoap scripts updated
This commit is contained in:
martin 2011-02-28 23:51:42 -05:00
parent d47fc41082
commit 781ceeaa7f
4 changed files with 23 additions and 2 deletions

View File

@ -2,7 +2,7 @@
$command = __DIR__."/../library/liquibase/liquibase --driver=org.postgresql.Driver "
."--classpath=".__DIR__."/../library/liquibase/lib/postgresql-9.0-801.jdbc4.jar "
."--changeLogFile=".__DIR__."/upgrade/db.changelog.xml "
."--changeLogFile=".__DIR__."/upgrade/db.changelog-master.xml "
."--url=\"jdbc:postgresql://localhost:5432/airtime\" "
."--username=airtime "
."--password=airtime "

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<include file="upgrade/db.changelog-1.7.xml"/>
</databaseChangeLog>

View File

@ -5,10 +5,11 @@ set("log.file.path", log_file)
set("log.stdout", true)
set("server.telnet", true)
queue = request.queue(conservative=true,length=600.,id="queue")
queue = request.queue(id="queue")
queue = audio_to_stereo(queue)
pypo_data = ref '0'
web_stream_enabled = ref false
def notify(m)
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['schedule_table_id']}")
@ -39,6 +40,7 @@ def add_skip_command(s) =
end
server.register(namespace="vars", "pypo_data", fun (s) -> begin pypo_data := s "Done" end)
server.register(namespace="vars", "web_stream_enabled", fun (s) -> begin web_stream_enabled := (s == "true") string_of(!web_stream_enabled) end)
default = single("/opt/pypo/files/basic/silence.mp3")
default = rewrite_metadata([("artist","Airtime"), ("title", "offline")],default)
@ -51,6 +53,14 @@ s = crossfade(s)
# Attach a skip command to the source s:
add_skip_command(s)
web_stream_source = input.http(id="web_stream", autostart = false, "")
s = switch(track_sensitive = false,
[
({ !web_stream_enabled }, web_stream_source),
({ true }, s)
]
)
if output_sound_device then
out_device = out(s)