Skip to content

Fix settings persistence caching and episode pattern extraction#378

Open
davdxpx wants to merge 1 commit into
mainfrom
fix/settings-persistence-and-episode-parsing-2356352453280611514
Open

Fix settings persistence caching and episode pattern extraction#378
davdxpx wants to merge 1 commit into
mainfrom
fix/settings-persistence-and-episode-parsing-2356352453280611514

Conversation

@davdxpx

@davdxpx davdxpx commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Addresses issues reported with dumb_channel and is_bot_setup_complete cache settings frequently resetting in non-public mode, as well as fixing pattern recognition errors when parsing multi-episode filenames like S04E01-02 or during manual string correction (e.g., E01E02). Tests verified pass with zero regression

- **Regex fix in `utils/media/detect.py`**: Updated `Pattern 2` to use `re.search(r'(?:^|[^\dxE])(\d{1,2})[_~-](\d{2})(?:[^\d]|$)', modified_f, re.IGNORECASE)`. This ensures that episodes prefixed with `E` (e.g., `E01-02`) are no longer erroneously excluded.
- **Improved episode correction**: Modified the `awaiting_episode_correction_` handler in `plugins/flow/search.py` to use a flexible regex parser rather than a strict `.isdigit()` check. This allows for valid user inputs like `E01E02` or `01-02`, converting them safely into lists or integers.
- **Cache invalidation for DB channels**: Added missing `_invalidate_settings_cache(user_id)` calls in `db/core.py` functions like `add_dumb_channel`, `remove_dumb_channel`, `set_default_dumb_channel`, `set_movie_dumb_channel`, and `set_series_dumb_channel`. This guarantees that changes to channel assignments and setup flags are properly synchronized across the application and persist seamlessly in non-public mode via the `global_settings` overlay.
Repository owner deleted a comment from google-labs-jules Bot Jun 30, 2026
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