Fix settings persistence caching and episode pattern extraction#378
Open
davdxpx wants to merge 1 commit into
Open
Fix settings persistence caching and episode pattern extraction#378davdxpx wants to merge 1 commit into
davdxpx wants to merge 1 commit into
Conversation
- **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.
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.
Addresses issues reported with
dumb_channelandis_bot_setup_completecache settings frequently resetting in non-public mode, as well as fixing pattern recognition errors when parsing multi-episode filenames likeS04E01-02or during manual string correction (e.g.,E01E02). Tests verified pass with zero regression