Fix inconsistency where some quality tags were only matched in bracketed
format but not in unbracketed format, causing streams with unbracketed
quality tags to be excluded from matching.
Previous issue:
- [4K], [Unknown], [Unk], [Slow], [Dead] were matched (bracketed)
- But "4K", "Unknown", "Unk", "Slow", "Dead" were NOT matched (unbracketed)
This caused streams like:
- "BBC One 4K" (no brackets) - NOT normalized, NOT matched
- "BBC One Unknown" - NOT normalized, NOT matched
- "ESPN (Slow)" - NOT normalized, NOT matched
Changes to HARDCODED_IGNORE_PATTERNS:
- Added 4K, Unknown, Unk, Slow, Dead to middle pattern: " TAG "
- Added 4K, Unknown, Unk, Slow, Dead to end pattern: " TAG"
- Added 4K, Unknown, Unk, Slow, Dead to colon pattern: "TAG:"
- Added 4K, Unknown, Unk, Slow, Dead to parentheses pattern: (TAG)
- Added inline documentation for each pattern type
- Note: All patterns already use re.IGNORECASE for case-insensitive matching
Now ALL quality tags are handled consistently across:
- Bracketed: [TAG] ✓
- Unbracketed at end: " TAG" ✓
- Unbracketed in middle: " TAG " ✓
- Parenthesized: (TAG) ✓
- With colon: "TAG:" ✓
This ensures no quality tags are missed regardless of format.
Fix bug where FHD and UHD streams were not being matched to channels.
The HARDCODED_IGNORE_PATTERNS were missing FHD and UHD in several regex
patterns, causing streams like "BBC one FHD" to fail normalization and
be excluded from matching results.
Changes:
- Add FHD and UHD to bracketed quality patterns: [FHD], [UHD], [fhd], [uhd]
- Add FHD and UHD to unbracketed quality patterns at end: " FHD", " UHD"
- Add FHD and UHD to parentheses patterns: (FHD), (UHD)
- Add FHD and UHD to word boundary patterns: "FHD:", "UHD:"
- Add UHD to STREAM_QUALITY_ORDER for proper quality sorting
- Add UHD to CHANNEL_QUALITY_TAG_ORDER for channel prioritization
This ensures streams with FHD/UHD quality tags are properly normalized
and matched alongside HD and SD streams.
Fixes issue where only HD and SD streams were matched while FHD streams
were ignored.
- Updated regex from '\bCinemax\s+' to '\bCinemax\b\s*'
- Now handles edge cases like Cinemax at end of string
- Matches Cinemax as complete word with optional trailing spaces
- Ensures proper matching for channels containing 'max'
The WebSocket notifications require frontend handlers in Dispatcharr's
WebSocket.jsx that cannot be added from the plugin code. Removed all
send_websocket_update() calls to avoid sending notifications that won't
be displayed.
The plugin still logs progress to the console for debugging.
Changes:
- Remove import of send_websocket_update
- Remove all WebSocket notification calls from:
* preview_changes_action
* add_streams_to_channels_action
* manage_channel_visibility_action
- Progress is still logged via standard logging
When a channel name contains "max" (case insensitive), the plugin
now removes "Cinemax" from stream names during matching. This allows
channels like "5StarMax" to properly match streams like:
- US: Cinemax 5Starmax
- US 5STARMAX (East) (H)
- US: 5 STARMAX
Changes:
- Add remove_cinemax parameter to normalize_name() in fuzzy_matcher.py
- Add remove_cinemax parameter to _clean_channel_name() in plugin.py
- Detect if channel name contains "max" in _match_streams_to_channel()
- Pass remove_cinemax=True to all stream name cleaning when applicable
- Update fuzzy_match() and find_best_match() to support Cinemax removal
This improves matching accuracy for Cinemax channels that include
the network name in stream names but not in channel names.
Root cause: Lines 1414-1415 were trying to access non-existent fields
'stream_count' and 'attached' directly from channel objects. These values
are actually stored in the channel_stream_counts dictionary and
channels_attached_to_others set respectively.
Changes:
- Fixed field access to use correct data structures
- Added error handling to check if channel exists in stream_counts
- Added debug logging to show evaluation details for each channel
- Added full traceback logging in exception handler for better debugging
This fixes the error: "Error managing channel visibility: 'stream_count'"