HLS only, Icecast retired. Removed Icecast outputs.
This commit is contained in:
83
server.ls
83
server.ls
@@ -138,12 +138,12 @@ pop_list.fetch()
|
|||||||
|
|
||||||
# Source setup [Each station]
|
# Source setup [Each station]
|
||||||
|
|
||||||
main_source = source.on_end(delay=1.0, main_list, main_queue)
|
main_source = source.on_end(delay=0.8, main_list, main_queue)
|
||||||
rock_source = source.on_end(delay=1.0, rock_list, rock_queue)
|
rock_source = source.on_end(delay=0.8, rock_list, rock_queue)
|
||||||
electronic_source = source.on_end(delay=1.0, electronic_list, electronic_queue)
|
electronic_source = source.on_end(delay=0.8, electronic_list, electronic_queue)
|
||||||
rap_source = source.on_end(delay=1.0, rap_list, rap_queue)
|
rap_source = source.on_end(delay=0.8, rap_list, rap_queue)
|
||||||
classical_source = source.on_end(delay=1.0, classical_list, classical_queue)
|
classical_source = source.on_end(delay=0.8, classical_list, classical_queue)
|
||||||
pop_source = source.on_end(delay=1.0, pop_list, pop_queue)
|
pop_source = source.on_end(delay=0.8, pop_list, pop_queue)
|
||||||
|
|
||||||
all_tracks_main = fallback(track_sensitive=false, [main_source, silence])
|
all_tracks_main = fallback(track_sensitive=false, [main_source, silence])
|
||||||
all_tracks_rock = fallback(track_sensitive=false, [rock_source, silence])
|
all_tracks_rock = fallback(track_sensitive=false, [rock_source, silence])
|
||||||
@@ -241,21 +241,21 @@ output.file.hls(
|
|||||||
mksafe(pop_source)
|
mksafe(pop_source)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# HTTP Server
|
||||||
|
|
||||||
def get_next_http(~protocol,~data,~headers,uri) =
|
def get_next_http(~protocol,~data,~headers,uri) =
|
||||||
log("Station from POST Data: #{data}")
|
|
||||||
if data == "main" then
|
if data == "main" then
|
||||||
_req = source.skip(all_tracks_main)
|
_req = source.skip(main_source)
|
||||||
elsif data == "rock" then
|
elsif data == "rock" then
|
||||||
_req = source.skip(all_tracks_rock)
|
_req = source.skip(rock_source)
|
||||||
elsif data == "electronic" then
|
elsif data == "electronic" then
|
||||||
_req = source.skip(all_tracks_electronic)
|
_req = source.skip(electronic_source)
|
||||||
elsif data == "rap" then
|
elsif data == "rap" then
|
||||||
_req = source.skip(all_tracks_rap)
|
_req = source.skip(rap_source)
|
||||||
elsif data == "classical" then
|
elsif data == "classical" then
|
||||||
_req = source.skip(all_tracks_classical)
|
_req = source.skip(classical_source)
|
||||||
elsif data == "pop" then
|
elsif data == "pop" then
|
||||||
_req = source.skip(all_tracks_pop)
|
_req = source.skip(pop_source)
|
||||||
end
|
end
|
||||||
http.response(
|
http.response(
|
||||||
protocol=protocol,
|
protocol=protocol,
|
||||||
@@ -266,59 +266,4 @@ end
|
|||||||
|
|
||||||
harbor.http.register(port=29000, method="POST", "/next", get_next_http)
|
harbor.http.register(port=29000, method="POST", "/next", get_next_http)
|
||||||
|
|
||||||
# Icecast Outputs [Each station]
|
# EOF
|
||||||
|
|
||||||
output.icecast(
|
|
||||||
%ogg(%vorbis(quality=1.0, samplerate=44100)),
|
|
||||||
host="localhost", port=9992,
|
|
||||||
user="redacted", password="redacted",
|
|
||||||
mount="sfm.ogg",
|
|
||||||
fallible=false,
|
|
||||||
all_tracks_main
|
|
||||||
)
|
|
||||||
|
|
||||||
output.icecast(
|
|
||||||
%ogg(%vorbis(quality=1.0, samplerate=44100)),
|
|
||||||
host="localhost", port=9992,
|
|
||||||
user="redacted", password="redacted",
|
|
||||||
mount="rock.ogg",
|
|
||||||
fallible=false,
|
|
||||||
all_tracks_rock
|
|
||||||
)
|
|
||||||
|
|
||||||
output.icecast(
|
|
||||||
%ogg(%vorbis(quality=1.0, samplerate=44100)),
|
|
||||||
host="localhost", port=9992,
|
|
||||||
user="redacted", password="redacted",
|
|
||||||
mount="electronic.ogg",
|
|
||||||
fallible=false,
|
|
||||||
all_tracks_electronic
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
output.icecast(
|
|
||||||
%ogg(%vorbis(quality=1.0, samplerate=44100)),
|
|
||||||
host="localhost", port=9992,
|
|
||||||
user="redacted", password="redacted",
|
|
||||||
mount="rap.ogg",
|
|
||||||
fallible=false,
|
|
||||||
all_tracks_rap
|
|
||||||
)
|
|
||||||
|
|
||||||
output.icecast(
|
|
||||||
%ogg(%vorbis(quality=1.0, samplerate=44100)),
|
|
||||||
host="localhost", port=9992,
|
|
||||||
user="redacted", password="redacted",
|
|
||||||
mount="classical.ogg",
|
|
||||||
fallible=false,
|
|
||||||
all_tracks_classical
|
|
||||||
)
|
|
||||||
|
|
||||||
output.icecast(
|
|
||||||
%ogg(%vorbis(quality=1.0, samplerate=44100)),
|
|
||||||
host="localhost", port=9992,
|
|
||||||
user="redacted", password="redacted",
|
|
||||||
mount="pop.ogg",
|
|
||||||
fallible=false,
|
|
||||||
all_tracks_pop
|
|
||||||
)
|
|
Reference in New Issue
Block a user