You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.5 KiB
Plaintext

#!/usr/bin/liquidsoap
# TAKEN FROM https://www.oshyn.com/Blogs/2010/June/Audio-and-Video-Streaming-with-Liquidsoap-and-Icecast
# Set the files and playlists,
default = single("/root/default.mp3")
jingles = playlist("/root/jingles")
tech = playlist.safe("/root/featured/tech")
minimal = playlist("/root/featured/minimal")
prog_trance = playlist("/root/featured/prog trance")
tech_trance = playlist("/root/featured/tech trance")
electro_house = playlist("/root/featured/electro house")
prog_house = playlist("/root/featured/prog house")
psy = playlist("/root/featured/psy")
chillout = playlist("/root/featured/chillout")
sets = playlist("/root/featured/sets")
liveset = mksafe(input.http("http://66.7.216.22:8968"))
liveset = rewrite_metadata([("artist", "Santiago Saa"),("title", "120 minutest Live")], liveset)
# Play files and playlists according to the radio program,
# and the default file if anything goes wrong.
radio = fallback(
[ switch( track_sensitive=false,
[
({ (1w or 2w or 3w) and 5h-8h }, prog_house),
({ (4w or 5w) and 5h05-8h }, prog_house),
({ (1w or 2w or 3w or 4w or 5w) and 8h-11h }, prog_trance),
({ (1w or 2w or 3w or 4w or 5w) and 11h-13h }, electro_house),
({ (1w or 2w or 3w or 4w or 5w) and 13h-15h }, prog_house),
({ (1w or 2w or 3w or 4w or 5w) and 15h-17h }, tech),
({ (1w or 2w or 3w or 4w or 5w) and 17h-20h }, sets),
({ (1w or 2w or 3w or 4w or 5w) and 20h-22h }, tech),
({ (1w or 2w or 3w or 4w or 5w) and 22h-0h }, prog_house),
({ 2w and 0h-5h }, psy),
({ 3w and 0h-5h }, psy),
({ 4w and 0h-3h }, psy),
({ 4w and 3h-5h05 }, liveset),
({ 5w and 0h-3h }, psy),
({ 5w and 3h-5h05 }, liveset),
({ 6w and 0h-3h }, psy),
({ 6w and 3h-5h05 }, liveset),
({ 6w and 5h05-8h }, psy),
({ 6w and 8h-11h }, tech_trance),
({ 6w and 11h-18h }, prog_trance),
({ 6w and 18h-21h }, tech_trance),
({ 6w and 21h-0h }, psy),
({ 7w and 0h-2h }, tech_trance),
({ 7w and 2h-3h }, psy),
({ 7w and 3h-5h }, psy),
({ 7w and 5h-7h }, tech),
({ 7w and 7h-23h59 }, minimal),
({ 1w and 0h-5h }, minimal),
({ true }, tech),
]),
tech])
# Add the normal jingles
radio = random(weights=[1,5],[ jingles, radio ])
# Output the full stream in OGG and MP3
output.icecast.mp3(
host="localhost",port=80, user”radio”,password="hackmeradio",
genre="Electronica",url="http://localhost",
description="Radio",mount="radio",
name="(((( Evolution Bass Radio ))))", bitrate=128,radio)