v1.10.0#277
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 newPatternRemapFilterand 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:
Daemon Integration:
Miscellaneous:
.vscode/settings.jsonto include new keywords related to log filtering for better developer experience. [1] [2]