Skip to content

v1.10.0#277

Merged
TiTidom-RC merged 5 commits into
betafrom
dev
Jun 18, 2026
Merged

v1.10.0#277
TiTidom-RC merged 5 commits into
betafrom
dev

Conversation

@TiTidom-RC

Copy link
Copy Markdown
Owner

This pull request introduces a new feature for customizable log filtering in the TTS Cast plugin, allowing users to define patterns that can change the log level or drop log messages dynamically. It includes both backend and frontend changes for configuration, storage, and application of these filters, as well as updates to the daemon to support this functionality. The version is bumped to 1.10.0.

Log Filtering Feature:

  • Added support for user-defined log filters that can remap log levels or drop log entries based on message patterns. This is implemented in the Python daemon (ttscastd.py) with a new PatternRemapFilter and integration into the logging setup. The filter rules are loaded from a JSON file and can be enabled/disabled via a configuration flag. [1] [2] [3] [4] [5]

  • The PHP backend now manages the log filters file: creating it on install/update, loading, and saving filter rules, and exposing AJAX endpoints for frontend interaction. [1] [2] [3] [4]

Frontend and Configuration:

  • Added a new modal window and UI controls in the configuration page to manage log filters, including enabling/disabling the feature, editing patterns, changing target levels, and saving filters. Includes a JavaScript file for dynamic table management and AJAX calls. [1] [2] [3] [4]

Daemon Integration:

  • The PHP daemon start command now passes the log filter enabled flag to the Python daemon. The daemon logs the status and number of active filters at startup. [1] [2]

Miscellaneous:

  • Improved filename sanitization for custom sound uploads for better security and compatibility.
  • Updated .vscode/settings.json to include new keywords related to log filtering for better developer experience. [1] [2]
  • Bumped plugin version to 1.10.0.
  • Added a README placeholder for the new filters data directory.

Introduce configurable log filters to remap or drop log records based on message patterns. Adds frontend modal and JS (desktop/modal/logfilters.ttscast.php, desktop/js/logfilters.ttscast.js) with AJAX save action, a new data file (data/filters/logfilters.json + README) and .gitignore entry. Backend: ajax handler to save filters and ttscast class methods to create/read/write the filters file and expose the logFiltersEnabled config key; install/update now initialize the config and file. Daemon: add PatternRemapFilter, load/apply filters when enabled (resources/ttscastd/ttscastd.py) and expose config in utils (resources/ttscastd/utils.py). Also update plugin configuration UI to toggle/manage filters and add related VSCode settings.
Update add button styling to use btn-success for better visibility. Reduce the log filters modal size and raise its top offset (width: 80%→65%, height: 70%→60%, top: 10vh→18vh) to improve layout. Affects desktop/modal/logfilters.ttscast.php and plugin_info/configuration.php.
Replace btn-default with btn-primary for the 'Gérer les filtres' button in plugin_info/configuration.php to make the filter control more visually prominent and consistent with primary action styling. No functional behavior changes.
Update plugin_info/info.json to set pluginVersion from 1.9.7 to 1.10.0 to reflect the new release.
Sanitize and validate filenames for custom sound uploads: transliterate UTF-8 to ASCII (iconv), replace non-alphanumeric/._- characters with underscores, collapse repeated underscores, and throw an exception if the cleaned basename is empty. This prevents invalid or unsafe filenames on the filesystem. Also add the TRANSLIT key to .vscode/settings.json.
@TiTidom-RC TiTidom-RC merged commit 49de9ec into beta Jun 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant