mirror of
https://github.com/home-assistant/core.git
synced 2025-09-10 15:21:38 +02:00
Fix error on startup when no Apps or Radio plugins are installed for Squeezebox (#150267)
This commit is contained in:
@@ -157,26 +157,28 @@ class BrowseData:
|
|||||||
|
|
||||||
cmd = ["apps", 0, browse_limit]
|
cmd = ["apps", 0, browse_limit]
|
||||||
result = await player.async_query(*cmd)
|
result = await player.async_query(*cmd)
|
||||||
for app in result["appss_loop"]:
|
if result["appss_loop"]:
|
||||||
app_cmd = "app-" + app["cmd"]
|
for app in result["appss_loop"]:
|
||||||
if app_cmd not in self.known_apps_radios:
|
app_cmd = "app-" + app["cmd"]
|
||||||
self.add_new_command(app_cmd, "item_id")
|
if app_cmd not in self.known_apps_radios:
|
||||||
_LOGGER.debug(
|
self.add_new_command(app_cmd, "item_id")
|
||||||
"Adding new command %s to browse data for player %s",
|
_LOGGER.debug(
|
||||||
app_cmd,
|
"Adding new command %s to browse data for player %s",
|
||||||
player.player_id,
|
app_cmd,
|
||||||
)
|
player.player_id,
|
||||||
|
)
|
||||||
cmd = ["radios", 0, browse_limit]
|
cmd = ["radios", 0, browse_limit]
|
||||||
result = await player.async_query(*cmd)
|
result = await player.async_query(*cmd)
|
||||||
for app in result["radioss_loop"]:
|
if result["radioss_loop"]:
|
||||||
app_cmd = "app-" + app["cmd"]
|
for app in result["radioss_loop"]:
|
||||||
if app_cmd not in self.known_apps_radios:
|
app_cmd = "app-" + app["cmd"]
|
||||||
self.add_new_command(app_cmd, "item_id")
|
if app_cmd not in self.known_apps_radios:
|
||||||
_LOGGER.debug(
|
self.add_new_command(app_cmd, "item_id")
|
||||||
"Adding new command %s to browse data for player %s",
|
_LOGGER.debug(
|
||||||
app_cmd,
|
"Adding new command %s to browse data for player %s",
|
||||||
player.player_id,
|
app_cmd,
|
||||||
)
|
player.player_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def _build_response_apps_radios_category(
|
def _build_response_apps_radios_category(
|
||||||
|
Reference in New Issue
Block a user