Ticket #332 (new Bugs)

Opened 2 months ago

Last modified 2 months ago

command server bugs

Reported by: infl00p Owned by: admin
Priority: 1 Milestone:
Component: Liquidsoap Version: 0.9.2+svn
Keywords: Cc:
Mac OSX: yes Linux: yes
NetBSD: yes Other Operating System: yes
FreeBSD: yes

Description

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 = mtitle? [("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 = mtitle? [("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 = mtitle? [("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)

Change History

Changed 2 months ago by infl00p

Found that it's caused by smart_crossfade but I believe that on_air and skip should work on the playing song.

Note: See TracTickets for help on using tickets.