sources test
This commit is contained in:
parent
e1ef84153a
commit
b247030174
@ -56,6 +56,7 @@ stream_server = os.environ.get("STREAM_SERVER")
|
|||||||
proxy_server = os.environ.get("PROXY_SERVER")
|
proxy_server = os.environ.get("PROXY_SERVER")
|
||||||
|
|
||||||
if icecast_server is not None and stream_server is not None:
|
if icecast_server is not None and stream_server is not None:
|
||||||
|
try:
|
||||||
with open("/app/sources.json", "r") as f:
|
with open("/app/sources.json", "r") as f:
|
||||||
data = json.loads(f.read())
|
data = json.loads(f.read())
|
||||||
playlist = "#EXTM3U\n"
|
playlist = "#EXTM3U\n"
|
||||||
@ -69,6 +70,8 @@ if icecast_server is not None and stream_server is not None:
|
|||||||
else:
|
else:
|
||||||
playlist += f'#EXTINF:0 radio="false", {name}\n'
|
playlist += f'#EXTINF:0 radio="false", {name}\n'
|
||||||
playlist += stream_server + key + "\n"
|
playlist += stream_server + key + "\n"
|
||||||
|
except Exception as e:
|
||||||
|
logger.info(e)
|
||||||
|
|
||||||
template_html = None
|
template_html = None
|
||||||
template_js = None
|
template_js = None
|
||||||
|
Loading…
Reference in New Issue
Block a user