0

全部。
我有以下用于运行多个播放列表的 radio.liq 文件。

# !/home/iceadmin/.opam/default/bin/liquidsoap
# log dir
set ("log.file.path","/var/log/liquidsoap/basic-radio.log")
set("scheduler.fast_queues",1)
 # Music
#music = playlist("/opt/liquidsoap/playlists/RadioOne.m3u",mode="normal",reload_mode="watch")
Station101  = playlist("https://MusicDomain/DJ/101.asp",mode="normal")
Station102  = playlist("https://MusicDomain/DJ/102.asp",mode="normal")

 # Some jingles
#jingles = single("/opt/liquidsoap/playlists/jingles/CFFRadio.mp3")
 # If something goes wrong, we'll play this
# security = single("/opt/liquidsoap/plalists/jingles")

#set("scheduler.fast_queues",1)

 # Start building the feed with music
radio101 = Station101
radio102 = Station102
 # Now add some jingles
#radio = random(weights = [1, 4],[radio, jingles])

#radio = crossfade(start_next=10.,fade_out=10.,fade_in=10.,radio)
 # And finally the security
#radio = fallback(track_sensitive = false, [radio, security])
#CFFRadio = crossfade(start_next=8.,fade_in=3.,fade_out=3.,radio)
#Station101
output.icecast(%mp3(bitrate=256,samplerate=44100,internal_quality=0,id3v2=true,stereo=true,stereo_mode="stereo"),
name="Radio One",
encoding="UTF-8",
host="192.168.2.203",
port=8000,
password="hackme",
icy_metadata="true",
description="CFF Radio - The Internets Home For Pure Music!",
mount="Radio101",
mksafe(radio101))

#Station102
output.icecast(%mp3(bitrate=256,samplerate=44100,internal_quality=0,id3v2=true,stereo=true,stereo_mode="stereo"),
name="Radio Two",
encoding="UTF-8",
host="192.168.2.203",
port=8000,
password="hackme",
icy_metadata="true",
description="Carrz Radio - The place where I come to Rock!",
mount="Radio102",
mksafe(radio102))

这确实有效,但是,我想知道的是以下内容。
假设我有 50 多个电台/播放列表
有没有更好的方法来加载它们,而不是像我在上面的代码示例中那样单独输入它们的数据信息?
并且在添加新列表时不必重新启动 Liquidsoap,因此不会踢所有听众并重新启动每个站?

像这样的东西,例如:(
在 ASP 或任何服务器端语言中,会对动态内容执行类似的操作。ID-GOES-HERE = request.QueryString("ID")
然后

Stations = playlist("https://MusicDomain.com/DJ/Station.asp?ID=<%=ID-GOES-HERE%>",mode="normal")

这将加载该特定电台的播放列表。
所以,如果 URL 是

Station.asp?ID=1
Station.asp?ID=2
Station.asp?ID=3

谢谢大家,您可以为此提供任何信息。
韦恩

4

0 回答 0