mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-05 14:55:08 +00:00
feat(vegas): one declared participation per plugin (scroll | pause | exclude) (#682)
A plugin takes part in Vegas mode in one declared way: 'scroll', 'pause' or 'exclude', resolved from the user's vegas_participation setting, the manifest field, then the legacy hooks, so no plugin changes behaviour. The stream manager decides inclusion and pauses through it; the installed plugins API and the Vegas plugin-order list report it. Deprecates get_supported_vegas_modes, get_vegas_segment_width and vegas_panel_count for removal in 3.9.0, and regenerates docs/DEPRECATIONS_3.8.md to include them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,9 @@ from web_interface.blueprints.api_v3 import (
|
||||
jsonify, logger, os, request, subprocess, success_response,
|
||||
)
|
||||
from src.common.path_safety import safe_path_component
|
||||
from src.plugin_system.base_plugin import (
|
||||
configured_vegas_participation, resolve_vegas_participation,
|
||||
)
|
||||
import web_interface.blueprints.api_v3 as _pkg
|
||||
# Read through the module rather than bound by value: tests patch these
|
||||
# as module attributes, and a value binding would not see the patch.
|
||||
@@ -129,6 +132,14 @@ def get_installed_plugins():
|
||||
if 'vegas_mode' in plugin_config:
|
||||
vegas_mode = plugin_config['vegas_mode']
|
||||
|
||||
# What Vegas actually does with the plugin: 'scroll', 'pause' or
|
||||
# 'exclude'. The same resolution the ticker uses; without a loaded
|
||||
# instance only the user's own setting is known.
|
||||
if plugin_instance is not None:
|
||||
vegas_participation = resolve_vegas_participation(plugin_instance, plugin_id)
|
||||
else:
|
||||
vegas_participation = configured_vegas_participation(plugin_id, plugin_config)
|
||||
|
||||
return {
|
||||
'id': plugin_id,
|
||||
'name': plugin_info.get('name', plugin_id),
|
||||
@@ -154,6 +165,7 @@ def get_installed_plugins():
|
||||
'web_ui_actions': plugin_info.get('web_ui_actions', []),
|
||||
'vegas_mode': vegas_mode,
|
||||
'vegas_content_type': vegas_content_type,
|
||||
'vegas_participation': vegas_participation,
|
||||
}
|
||||
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
Reference in New Issue
Block a user