#332: command server bugs
------------------------+---------------------------------------------------
Reporter: infl00p | Owner: admin
Type: Bugs | Status: new
Priority: 1 | Milestone:
Component: Liquidsoap | Version: 0.9.2+svn
Keywords: | Mac: 1
Linux: 1 | Netbsd: 1
Other: 1 | Freebsd: 1
------------------------+---------------------------------------------------
Hello, I'm using the command server (telnet) to feed a web panel with the
status of the radio.
My radio plays a randomized playlist source and has a request queue
source. When there is a request on the queue playing the on_air command
outputs both IDs, the one in the playlist and the one on the queue head.
An example output follows
---------------------------------------------
on_air
48 47
END
trace 48
[2010/01/01 10:21:02] Pushed ["/opt/storage/share/Music//OverClocked ReMix
OCR01001 to OCR01900/Final_Fantasy_6_Seized_with_Fury_OC_ReMix.ogg";...].
[2010/01/01 10:21:11] Currently on air.
END
trace 47
[2010/01/01 10:20:32] Pushed ["/opt/storage/share/Music/OverClocked ReMix
OCR00001 to
OCR01000/Final_Fantasy_6_Dancing_Madly_(Second_Form)_OC_ReMix.ogg";...].
[2010/01/01 10:20:32] Entering the secondary queue.
[2010/01/01 10:26:32] Entering the primary queue.
[2010/01/01 10:26:42] Currently on air.
END
------------------------------------
This of course messes up my web panel since the song playing is not 48 but
47.
Also if I issue a radio(dot)ogg.skip command it skips both sources and
plays the new one in the playlist not the new one in the queue.
I don't know if this is a bug in my script but it's based entirely on the
advanced case study script on the site.
script follows
----------------------------------------
#!/usr/local/bin/liquidsoap
# Settings
set("server.telnet",true)
set("server.telnet.bind_addr","127.0.0.1")
set("server.telnet.port",1234)
set("server.telnet.reverse_dns",false)
set("harbor.bind_addr","127.0.0.1")
set("harbor.port",8005)
set("harbor.password","xxx")
set("harbor.reverse_dns",false)
set("harbor.timeout",10.)
# sources
on_fail = single("/home/xxx/radio/fail.ogg")
mpdplayback = input.harbor(id="playlist", "playlist.ogg", buffer=5.)
def mpd_title(m) =
title = m["title"]
[("title","#{title} - radio")]
end
mpdplayback = map_metadata(mpd_title, strip=true, mpdplayback)
# clock jingle
clock = playlist(mode="random",reload=3600, "/home/xxx/radio/clock.list")
# User requests
req = request.equeue(id="request")
def req_title(m) =
title = m["title"]
[("title","#{title} - radio requests")]
end
req = map_metadata(req_title, strip=true, req)
randomplay = smart_crossfade(start_next=2.,
normalize(playlist(mode="random",reload=1200,"/opt/storage/share/Music/")))
def random_title(m) =
title = m["title"]
[("title","#{title} - radio random play")]
end
randomplay = map_metadata(random_title, strip=true, randomplay)
scheduler = add(weights=[1,4],
[fallback([ mpdplayback, req, randomplay, on_fail ]),
switch([({ 0m and 0s-5s },delay(5.,clock))])])
def live_title(m) =
[("title","Now Live @ radio")]
end
def full
emission = input.harbor("emission.ogg")
emission = map_metadata(live_title, strip=true, emission)
emission = strip_blank(emission, length=10., threshold=-50.)
fallback(track_sensitive=false, [ emission, scheduler ])
end
# Outputs
out = output.icecast.vorbis(
host="localhost",
port= 8000,
password = "xxx",
quality=5.,
public=true,
name="Radio",
genre="misc",
url="http://radio",
description="Radio")
out(mount="radio.ogg",full)
--
Ticket URL: <http://savonet.rastageeks.org/ticket/332>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac