mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-05 06:45:09 +00:00
chore: mark skins unsupported, fix stale docs and preview size, prepare 3.4.0
Skins: no current scoreboard plugin builds on src.base_classes, so the only skin hook (SportsCore._render_game) never runs. The plugin schema endpoint no longer injects the Visual Skin dropdown, the store hides and refuses "type": "skin" registry entries, and GET /api/v3/skins reports supported: false with a message. Stored skin config still loads and saves. src/skin_system/ and its tests are unchanged apart from the support flag. Docs: check_plugin.py/render_plugin.py examples use --plugin; document BasePlugin.get_update_interval() and its interaction with the manifest update_interval; CLAUDE.md drops the stale template line number and recommends display_manager.width/height. Preview size: new src/display_geometry.py holds the size computation and defaults DisplayManager uses (double-sided applied, chain_length default 2). The web preview, /display/current, Starlark magnify default, sync handshake and two dev scripts use it. Release: __version__ 3.4.0, CHANGELOG 3.4.0 section plus a 3.3.0 tag note. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,9 +154,15 @@ def list_skins():
|
||||
"""List installed visual skins (docs/SKIN_SYSTEM.md).
|
||||
|
||||
Optional ?plugin_id=... filters to skins matching that plugin.
|
||||
|
||||
The response carries ``supported: false`` and a ``message``: the current
|
||||
scoreboard plugins don't render skins, so a client must not present
|
||||
these as selectable.
|
||||
"""
|
||||
try:
|
||||
from src.skin_system import skin_runtime
|
||||
from src.skin_system import (
|
||||
SKINS_RENDER_SUPPORTED, SKINS_UNSUPPORTED_MESSAGE, skin_runtime,
|
||||
)
|
||||
|
||||
plugin_id = request.args.get('plugin_id')
|
||||
if plugin_id:
|
||||
@@ -181,7 +187,10 @@ def list_skins():
|
||||
'modes': manifest.get('modes', []),
|
||||
'has_preview': bool(preview and (skin_dir / preview).is_file()),
|
||||
})
|
||||
return jsonify({'status': 'success', 'data': {'skins': payload}})
|
||||
data = {'skins': payload, 'supported': SKINS_RENDER_SUPPORTED}
|
||||
if not SKINS_RENDER_SUPPORTED:
|
||||
data['message'] = SKINS_UNSUPPORTED_MESSAGE
|
||||
return jsonify({'status': 'success', 'data': data})
|
||||
except Exception as e:
|
||||
logger.error('Error in list_skins', exc_info=True)
|
||||
return jsonify({'status': 'error', 'message': 'An error occurred; see logs for details', 'details': describe_exception(e)}), 500
|
||||
|
||||
Reference in New Issue
Block a user