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
This commit is contained in:
Pirates IRC
2025-12-20 18:40:48 -06:00
committed by GitHub
parent 42059051c6
commit bcf9cebbc3
2 changed files with 30 additions and 7 deletions

View File

@@ -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

View File

@@ -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)