140 lines
5.4 KiB
Plaintext
140 lines
5.4 KiB
Plaintext
set("log.file",false)
|
|
set("log.stdout",true)
|
|
|
|
set("server.telnet",true)
|
|
set("server.telnet.port", 5000)
|
|
set("server.telnet.bind_addr", "0.0.0.0")
|
|
|
|
set("decoder.file_extensions.gstreamer",["wav", "webm"])
|
|
set("decoder.mime_types.gstreamer",["audio/x-wav", "audio/wav", "video/webm"])
|
|
|
|
def crossfade(a,b)
|
|
add(normalize=false,
|
|
[ sequence([ blank(duration=5.),
|
|
fade.initial(duration=5.,b) ]),
|
|
fade.final(duration=5.,a) ])
|
|
end
|
|
|
|
live = audio_to_stereo(
|
|
rewrite_metadata(
|
|
[
|
|
("title", "$(title) (LIVE - Dodsorfas Radio)"),
|
|
("comment", "http://www.radio.dodsorf.as")
|
|
],
|
|
stretch(
|
|
ratio=interactive.float("test", 1.00005),
|
|
input.harbor(
|
|
"dodsorfas.live",
|
|
id="dodsorfas.live",
|
|
port=5002,
|
|
password=getenv("LIVE_PASSWORD"),
|
|
user="source",
|
|
logfile="/tmp/harbor.log"
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
## BEGIN PLAYLISTS
|
|
|
|
# Joakim
|
|
JoakimDiverse = "/playlists/Joakim/JoakimDiverse.m3u"
|
|
AlternativeJoa = "/playlists/Joakim/AlternativeJoa.m3u"
|
|
|
|
# Daniel
|
|
DanAwesome = "/playlists/Daniel/Dan - awesome.m3u"
|
|
DanDontStarve1 = "/playlists/Daniel/Dan - dontstarve1.m3u"
|
|
DanDubstepThingies = "/playlists/Daniel/Dan - dubstepthingies.m3u"
|
|
DanEdgyMusicYT = "/playlists/Daniel/Dan - Edgy Music YT.m3u"
|
|
DanElectronicRealMusic = "/playlists/Daniel/Dan - electronicrealmusic.m3u"
|
|
|
|
# Artists
|
|
TaylorSwift = "/playlists/artists/TaylorSwift.m3u"
|
|
AstridS = "/playlists/artists/AstridS.m3u"
|
|
Coldplay = "/playlists/artists/Coldplay.m3u"
|
|
DemiLovato = "/playlists/artists/DemiLovato.m3u"
|
|
KatyPerry = "/playlists/artists/KatyPerry.m3u"
|
|
SelenaGomez = "/playlists/artists/SelenaGomez.m3u"
|
|
ShawnMendes = "/playlists/artists/ShawnMendes.m3u"
|
|
ZaraLarsson = "/playlists/artists/ZaraLarsson.m3u"
|
|
|
|
# Genres
|
|
Musicals = "/playlists/Musicals.m3u"
|
|
Soundtracks = "/playlists/Soundtracks.m3u"
|
|
|
|
## END PLAYLISTS
|
|
|
|
|
|
randomsong = playlist(JoakimDiverse)
|
|
count = list.length(playlist.parse(JoakimDiverse))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(AlternativeJoa)), count], [playlist(AlternativeJoa), randomsong])
|
|
count = count + list.length(playlist.parse(AlternativeJoa))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(DanAwesome)), count], [playlist(DanAwesome), randomsong])
|
|
count = count + list.length(playlist.parse(DanAwesome))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(DanDontStarve1)), count], [playlist(DanDontStarve1), randomsong])
|
|
count = count + list.length(playlist.parse(DanDontStarve1))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(DanDubstepThingies)), count], [playlist(DanDubstepThingies), randomsong])
|
|
count = count + list.length(playlist.parse(DanDubstepThingies))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(DanEdgyMusicYT)), count], [playlist(DanEdgyMusicYT), randomsong])
|
|
count = count + list.length(playlist.parse(DanEdgyMusicYT))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(DanElectronicRealMusic)), count], [playlist(DanElectronicRealMusic), randomsong])
|
|
count = count + list.length(playlist.parse(DanElectronicRealMusic))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(TaylorSwift)), count], [playlist(TaylorSwift), randomsong])
|
|
count = count + list.length(playlist.parse(TaylorSwift))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(AstridS)), count], [playlist(AstridS), randomsong])
|
|
count = count + list.length(playlist.parse(AstridS))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(Coldplay)), count], [playlist(Coldplay), randomsong])
|
|
count = count + list.length(playlist.parse(Coldplay))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(DemiLovato)), count], [playlist(DemiLovato), randomsong])
|
|
count = count + list.length(playlist.parse(DemiLovato))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(KatyPerry)), count], [playlist(KatyPerry), randomsong])
|
|
count = count + list.length(playlist.parse(KatyPerry))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(SelenaGomez)), count], [playlist(SelenaGomez), randomsong])
|
|
count = count + list.length(playlist.parse(SelenaGomez))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(ShawnMendes)), count], [playlist(ShawnMendes), randomsong])
|
|
count = count + list.length(playlist.parse(ShawnMendes))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(ZaraLarsson)), count], [playlist(ZaraLarsson), randomsong])
|
|
count = count + list.length(playlist.parse(ZaraLarsson))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(Musicals)), count], [playlist(Musicals), randomsong])
|
|
count = count + list.length(playlist.parse(Musicals))
|
|
|
|
randomsong = random(weights=[list.length(playlist.parse(Soundtracks)), count], [playlist(Soundtracks), randomsong])
|
|
count = count + list.length(playlist.parse(Soundtracks))
|
|
|
|
|
|
randomsong = audio_to_stereo(randomsong)
|
|
|
|
###
|
|
requests = audio_to_stereo(drop_video(request.queue(id="request")))
|
|
|
|
mix = blank()
|
|
mix = fallback(track_sensitive=false, [randomsong, mix])
|
|
mix = fallback(track_sensitive=true, transitions=[crossfade], [requests,mix])
|
|
mix = normalize(mix)
|
|
mix = fallback(track_sensitive=false, transitions=[crossfade], [live, mix])
|
|
|
|
# OUTPUTS
|
|
output.icecast(
|
|
password=getenv("HARBOR_PASSWORD"),
|
|
host=getenv("BROADCAST_PORT_5001_TCP_ADDR"),
|
|
port=int_of_string(getenv("BROADCAST_PORT_5001_TCP_PORT")),
|
|
%wav,
|
|
mount="dodsorfas.main",
|
|
mix
|
|
)
|