print url with bad content-type

This commit is contained in:
Roy Olav Purser 2021-06-04 08:37:57 +02:00
parent 48c666f133
commit aad477ef90
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -123,8 +123,9 @@ class StreamProvider():
except Exception as e:
self.logger.info("%s <%s>", e, self.upstream)
else:
ctype = resp.headers.get("Content-Type", "binary/octet-stream").lower()
ctype = resp.headers.get("Content-Type", "text/plain").lower()
if ctype.startswith("text"):
self.logger.info("Bad Content-Type %s", data.upstream())
ctype = None
elif "mpegurl" in ctype:
ctype = "application/vnd.apple.mpegurl"