streampunk wrote:
> Very interesting, didn't know that.
> I imagine it's not that easy as putting
> >
Code:
--------------------
> > def handler()
> system("/path/to/your/shutdown-script")
> end
> source = on_blank(handler,source)
>
--------------------
> >
> into the Liquidsoap recipe (*.liq file)
> >
Code:
--------------------
> > #!/usr/bin/liquidsoap
> # set the path and permissions for the logfile
> set("log.file.path","/var/log/liquidsoap/phono.log")
> set("log.file.perms",777)
> set("log.unix_timestamps",true)
> #input from soundcard
> phono = input.alsa(bufferize=true,fallible=false,device="hw:1")
> #stream it to local icecast, default port and password
>
output.icecast(%ogg(%flac(samplerate=44100,channels=2,compression=5,bits_per_sample=16)),
mount="/phono", name="Phono", format="audio/ogg", description="Turntable
FLAC", url="http://192.168.178.200", genre = "Misc", phono)
--------------------
> >
> ?
>
> Also, I didn't find information whether the length of the blank can be
> configured with on_blank in the same way as with strip_blank
> (strip_blank(max_blank=5...)?
In theory I think it is as simple as that
In your example the code would be
Code:
--------------------
def handler()
system("/path/to/your/shutdown-script")
end
phono = on_blank(handler,phono)
--------------------
But like you I can't find any documentation that determines the length
of on_blank.
Also you have to remember that the shutdown script needs to take account
of the user running Liquidsoap and the fact that the Pi will still have
mains power i.e. it does not really switch off. To switch it back on
would require toggling the power.
*Pi3 with piCoreplayer music on QNAP TS419p via NFS*
iThingys/iPeng/Tablets/Jogglers
*Living Room* - Joggler & SB3 -> Onkyo TS606 - > Celestion Ditton F20s
*Office* - Pi -> Sony TA FE320 -> Celestion F10s / Pi & SB3 -> Onkyo CRN
755 -> Wharfedale Modus Cubes
*Dining Room* -> SB Boom *Kitchen* -> UE Radio (upgraded to SB Radio)
*Bedroom (Bedside)* - SB Touch -> Topping TP21 -> AKG Headphones
------------------------------------------------------------------------
d6jg's Profile: http://forums.slimdevices.com/member.php?userid=44051
View this thread: http://forums.slimdevices.com/showthread.php?t=49584
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins