Use content type multipart constant (#40314)

This commit is contained in:
springstan authored and GitHub committed 2020-09-23 11:29:56 +02:00
1 parent 7876cdb37a
commit c2d20c548f
2 files changed
+5 -3

No files matched your search

+3 -2
View File
@@ -7,6 +7,7 @@ import voluptuous as vol
from homeassistant.const import (
ATTR_ENTITY_ID,
CONTENT_TYPE_MULTIPART,
EVENT_HOMEASSISTANT_START,
EVENT_HOMEASSISTANT_STOP,
)
@@ -122,9 +123,9 @@ class FFmpegManager:
def ffmpeg_stream_content_type(self):
"""Return HTTP content type for ffmpeg stream."""
if self._major_version is not None and self._major_version > 3:
return "multipart/x-mixed-replace;boundary=ffmpeg"
return CONTENT_TYPE_MULTIPART.format("ffmpeg")
return "multipart/x-mixed-replace;boundary=ffserver"
return CONTENT_TYPE_MULTIPART.format("ffserver")
class FFmpegBase(Entity):