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:
|
||||
self.logger.info("%s <%s>", e, self.upstream)
|
||||
else:
|
||||
ctype = resp.headers.get("Content-Type", "binary/octet-stream")
|
||||
if "mpegurl" in ctype.lower():
|
||||
ctype = resp.headers.get("Content-Type", "binary/octet-stream").lower()
|
||||
if ctype.startswith("text"):
|
||||
ctype = None
|
||||
elif "mpegurl" in ctype:
|
||||
ctype = "application/vnd.apple.mpegurl"
|
||||
return StreamData(data.upstream(), ctype, data.thumbnail(), data.title(), data.description(), data.override)
|
||||
async def run(self):
|
||||
|
Loading…
Reference in New Issue
Block a user