move status print

This commit is contained in:
Roy Olav Purser 2021-05-09 11:14:45 +02:00
parent 3cd9a34535
commit 0366e534d0
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -48,10 +48,13 @@ if icecast_server is not None and stream_server is not None:
def rewrite(current, proxy):
resp = requests.head(current)
ctype = resp.headers.get("Content-Type", "text/plain").lower()
ctype = resp.headers.get("Content-Type")
print(ctype)
if "mpegurl" not in ctype:
if ctype is None:
return None
else:
if "mpegurl" not in ctype.lower():
return None
resp = requests.get(current)
ndata = None
if resp.text is not None: