Fix typo in go2rtc (#130165)

Fix typo in original
This commit is contained in:
Jan Bouwhuis 2024-11-08 20:38:38 +01:00 committed by GitHub
parent c97cc34879
commit 9037cb8a7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 14 deletions

View file

@ -244,7 +244,7 @@ class WebRTCProvider(CameraWebRTCProvider):
if self._data.managed:
# HA manages the go2rtc instance
stream_original_name = f"{camera.entity_id}_orginal"
stream_original_name = f"{camera.entity_id}_original"
stream_redirect_sources = [
f"rtsp://127.0.0.1:{HA_MANAGED_RTSP_PORT}/{stream_original_name}",
f"ffmpeg:{stream_original_name}#audio=opus",

View file

@ -313,7 +313,7 @@ async def test_setup_managed(
camera = init_test_integration
entity_id = camera.entity_id
stream_name_orginal = f"{camera.entity_id}_orginal"
stream_name_original = f"{camera.entity_id}_original"
assert camera.frontend_stream_type == StreamType.HLS
assert await async_setup_component(hass, DOMAIN, config)
@ -346,12 +346,12 @@ async def test_setup_managed(
await test()
stream_added_calls = [
call(stream_name_orginal, "rtsp://stream"),
call(stream_name_original, "rtsp://stream"),
call(
entity_id,
[
f"rtsp://127.0.0.1:18554/{stream_name_orginal}",
f"ffmpeg:{stream_name_orginal}#audio=opus",
f"rtsp://127.0.0.1:18554/{stream_name_original}",
f"ffmpeg:{stream_name_original}#audio=opus",
],
),
]
@ -362,8 +362,8 @@ async def test_setup_managed(
rest_client.streams.list.return_value = {
entity_id: Stream(
[
Producer(f"rtsp://127.0.0.1:18554/{stream_name_orginal}"),
Producer(f"ffmpeg:{stream_name_orginal}#audio=opus"),
Producer(f"rtsp://127.0.0.1:18554/{stream_name_original}"),
Producer(f"ffmpeg:{stream_name_original}#audio=opus"),
]
)
}
@ -377,11 +377,11 @@ async def test_setup_managed(
# Stream original source different
rest_client.streams.add.reset_mock()
rest_client.streams.list.return_value = {
stream_name_orginal: Stream([Producer("rtsp://different")]),
stream_name_original: Stream([Producer("rtsp://different")]),
entity_id: Stream(
[
Producer(f"rtsp://127.0.0.1:18554/{stream_name_orginal}"),
Producer(f"ffmpeg:{stream_name_orginal}#audio=opus"),
Producer(f"rtsp://127.0.0.1:18554/{stream_name_original}"),
Producer(f"ffmpeg:{stream_name_original}#audio=opus"),
]
),
}
@ -395,7 +395,7 @@ async def test_setup_managed(
# Stream source different
rest_client.streams.add.reset_mock()
rest_client.streams.list.return_value = {
stream_name_orginal: Stream([Producer("rtsp://stream")]),
stream_name_original: Stream([Producer("rtsp://stream")]),
entity_id: Stream([Producer("rtsp://different")]),
}
@ -408,11 +408,11 @@ async def test_setup_managed(
# If the stream is already added, the stream should not be added again.
rest_client.streams.add.reset_mock()
rest_client.streams.list.return_value = {
stream_name_orginal: Stream([Producer("rtsp://stream")]),
stream_name_original: Stream([Producer("rtsp://stream")]),
entity_id: Stream(
[
Producer(f"rtsp://127.0.0.1:18554/{stream_name_orginal}"),
Producer(f"ffmpeg:{stream_name_orginal}#audio=opus"),
Producer(f"rtsp://127.0.0.1:18554/{stream_name_original}"),
Producer(f"ffmpeg:{stream_name_original}#audio=opus"),
]
),
}