remove content-type starting with text
This commit is contained in:
parent
cdc28ebc13
commit
d3808c43f8
@ -123,8 +123,10 @@ class StreamProvider():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.info("%s <%s>", e, self.upstream)
|
self.logger.info("%s <%s>", e, self.upstream)
|
||||||
else:
|
else:
|
||||||
ctype = resp.headers.get("Content-Type", "binary/octet-stream")
|
ctype = resp.headers.get("Content-Type", "binary/octet-stream").lower()
|
||||||
if "mpegurl" in ctype.lower():
|
if ctype.startswith("text"):
|
||||||
|
ctype = None
|
||||||
|
elif "mpegurl" in ctype:
|
||||||
ctype = "application/vnd.apple.mpegurl"
|
ctype = "application/vnd.apple.mpegurl"
|
||||||
return StreamData(data.upstream(), ctype, data.thumbnail(), data.title(), data.description(), data.override)
|
return StreamData(data.upstream(), ctype, data.thumbnail(), data.title(), data.description(), data.override)
|
||||||
async def run(self):
|
async def run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user