mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-07-06 09:51:14 +02:00
fix(channels): use device-reported max_channels instead of hardcoded 8
Firmware reports MAX_GROUP_CHANNELS (typically 40 for companion builds) in the DEVICE_INFO response. Fetch it at startup and use it in all channel iteration loops. Previously hardcoded range(8) prevented channels 8+ from appearing and blocked adding new channels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -258,7 +258,7 @@ def _execute_console_command(args: list) -> str:
|
||||
|
||||
elif cmd == 'channels':
|
||||
lines = []
|
||||
for i in range(8):
|
||||
for i in range(device_manager._max_channels):
|
||||
ch = device_manager.get_channel_info(i)
|
||||
if ch and ch.get('name'):
|
||||
lines.append(f" [{i}] {ch['name']}")
|
||||
|
||||
Reference in New Issue
Block a user