diff --git a/fHDHR/device/tuners/__init__.py b/fHDHR/device/tuners/__init__.py index 7ddbb8d..b90715b 100644 --- a/fHDHR/device/tuners/__init__.py +++ b/fHDHR/device/tuners/__init__.py @@ -95,12 +95,15 @@ class Tuners(): if not stream_args["channelUri"]: raise TunerError("806 - Tune Failed") - channelUri_headers = self.fhdhr.web.session.head(stream_args["channelUri"]).headers - stream_args["true_content_type"] = channelUri_headers['Content-Type'] + if "udp:" not in stream_args["channelUri"]: + channelUri_headers = self.fhdhr.web.session.head(stream_args["channelUri"]).headers + stream_args["true_content_type"] = channelUri_headers['Content-Type'] - if stream_args["true_content_type"].startswith(tuple(["application/", "text/"])): - stream_args["content_type"] = "video/mpeg" + if stream_args["true_content_type"].startswith(tuple(["application/", "text/"])): + stream_args["content_type"] = "video/mpeg" + else: + stream_args["content_type"] = stream_args["true_content_type"] else: - stream_args["content_type"] = stream_args["true_content_type"] + stream_args["content_type"] = "video/mpeg" return stream_args