From bcf9cebbc33e871c3893800b9807273f4d192f00 Mon Sep 17 00:00:00 2001 From: Pirates IRC <98669745+PiratesIRC@users.noreply.github.com> Date: Sat, 20 Dec 2025 18:40:48 -0600 Subject: [PATCH] Add files via upload # Stream-Mapparr v0.7.2 ## What Was Fixed Updated fuzzy_matcher.py dependency to include complete regional pattern support for all US timezone indicators. ## The Issue - "E! Entertainment" was incorrectly matching `USA: E! ENTERTAINMENT (WEST)` - fuzzy_matcher.py only recognized "East", missing West/Pacific/Central/Mountain/Atlantic - Affected users with `Ignore Regional Tags: False` setting ## The Solution **plugin.py v0.7.2**: - Updated version to 0.7.2 - Added minimum fuzzy_matcher version requirement: 25.354.1835 **fuzzy_matcher.py v25.354.1835** (required dependency): - Added 5 missing regional indicators: West, Pacific, Central, Mountain, Atlantic - Each in both word format (` West`) and parenthesized format (`(West)`) - Updated extract_tags() to recognize all regional indicators --- Stream-Mapparr/fuzzy_matcher.py | 34 +++++++++++++++++++++++++++------ Stream-Mapparr/plugin.py | 3 ++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Stream-Mapparr/fuzzy_matcher.py b/Stream-Mapparr/fuzzy_matcher.py index 8d51e32..fc3819b 100644 --- a/Stream-Mapparr/fuzzy_matcher.py +++ b/Stream-Mapparr/fuzzy_matcher.py @@ -12,7 +12,7 @@ import unicodedata from glob import glob # Version: YY.DDD.HHMM (Julian date format: Year.DayOfYear.Time) -__version__ = "25.343.1430" +__version__ = "25.354.1835" # Setup logging LOGGER = logging.getLogger("plugins.fuzzy_matcher") @@ -43,10 +43,32 @@ QUALITY_PATTERNS = [ r'\s+\b(4K|8K|UHD|FHD|HD|SD|FD|Unknown|Unk|Slow|Dead)\b\s+', ] -# Regional indicator patterns: East, West, etc. +# Regional indicator patterns: East, West, Pacific, Central, Mountain, Atlantic REGIONAL_PATTERNS = [ - # Regional: " East" or " east" + # Regional: " East" or " east" (word with space prefix) r'\s[Ee][Aa][Ss][Tt]', + # Regional: " West" or " west" (word with space prefix) + r'\s[Ww][Ee][Ss][Tt]', + # Regional: " Pacific" or " pacific" (word with space prefix) + r'\s[Pp][Aa][Cc][Ii][Ff][Ii][Cc]', + # Regional: " Central" or " central" (word with space prefix) + r'\s[Cc][Ee][Nn][Tt][Rr][Aa][Ll]', + # Regional: " Mountain" or " mountain" (word with space prefix) + r'\s[Mm][Oo][Uu][Nn][Tt][Aa][Ii][Nn]', + # Regional: " Atlantic" or " atlantic" (word with space prefix) + r'\s[Aa][Tt][Ll][Aa][Nn][Tt][Ii][Cc]', + # Regional: (East) or (EAST) (parenthesized format) + r'\s*\([Ee][Aa][Ss][Tt]\)\s*', + # Regional: (West) or (WEST) (parenthesized format) + r'\s*\([Ww][Ee][Ss][Tt]\)\s*', + # Regional: (Pacific) or (PACIFIC) (parenthesized format) + r'\s*\([Pp][Aa][Cc][Ii][Ff][Ii][Cc]\)\s*', + # Regional: (Central) or (CENTRAL) (parenthesized format) + r'\s*\([Cc][Ee][Nn][Tt][Rr][Aa][Ll]\)\s*', + # Regional: (Mountain) or (MOUNTAIN) (parenthesized format) + r'\s*\([Mm][Oo][Uu][Nn][Tt][Aa][Ii][Nn]\)\s*', + # Regional: (Atlantic) or (ATLANTIC) (parenthesized format) + r'\s*\([Aa][Tt][Ll][Aa][Nn][Tt][Ii][Cc]\)\s*', ] # Geographic prefix patterns: US:, USA:, etc. @@ -431,12 +453,12 @@ class FuzzyMatcher: quality_tags = [] # Extract regional indicator - regional_pattern_paren = r'\((East|West)\)' + regional_pattern_paren = r'\((East|West|Pacific|Central|Mountain|Atlantic)\)' regional_match = re.search(regional_pattern_paren, name, re.IGNORECASE) if regional_match: regional = regional_match.group(1).capitalize() else: - regional_pattern_word = r'\b(East|West)\b(?!.*\b(East|West)\b)' + regional_pattern_word = r'\b(East|West|Pacific|Central|Mountain|Atlantic)\b(?!.*\b(East|West|Pacific|Central|Mountain|Atlantic)\b)' regional_match = re.search(regional_pattern_word, name, re.IGNORECASE) if regional_match: regional = regional_match.group(1).capitalize() @@ -457,7 +479,7 @@ class FuzzyMatcher: tag_upper = tag.upper() # Skip regional indicators - if tag_upper in ['EAST', 'WEST']: + if tag_upper in ['EAST', 'WEST', 'PACIFIC', 'CENTRAL', 'MOUNTAIN', 'ATLANTIC']: continue # Skip callsigns diff --git a/Stream-Mapparr/plugin.py b/Stream-Mapparr/plugin.py index 5b927d4..d01e706 100644 --- a/Stream-Mapparr/plugin.py +++ b/Stream-Mapparr/plugin.py @@ -63,7 +63,8 @@ class PluginConfig: """ # === PLUGIN METADATA === - PLUGIN_VERSION = "0.7.1" + PLUGIN_VERSION = "0.7.2" + FUZZY_MATCHER_MIN_VERSION = "25.354.1835" # Requires complete regional patterns support # === MATCHING SETTINGS === DEFAULT_FUZZY_MATCH_THRESHOLD = 85 # Minimum similarity score (0-100)