From 25bc57e4ea1483d992c3ebc7dced0d3f30a71acc Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Wed, 22 Nov 2023 16:49:42 +0100 Subject: [PATCH] Fix media browser when no snapshot available --- custom_components/shinobi/media_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/shinobi/media_source.py b/custom_components/shinobi/media_source.py index 3d4dd08..d432519 100644 --- a/custom_components/shinobi/media_source.py +++ b/custom_components/shinobi/media_source.py @@ -218,7 +218,7 @@ async def _async_build_monitors( if monitor_data is not None: snapshot = monitor_data.snapshot - if snapshot.startswith("/"): + if snapshot and snapshot.startswith("/"): snapshot = snapshot[1:] snapshot = api.build_proxy_url(f"{{base_url}}{snapshot}")