# 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
## M3U Source Prioritization
Stream-Mapparr allows you to prioritize streams from specific M3U providers, ensuring your preferred sources are always selected first, regardless of quality metrics.
### How It Works
When you specify M3U sources in the **"📡 M3U Sources"** setting, streams are sorted using a multi-level hierarchy:
1. **M3U Priority** (0 = highest) - Based on order in your comma-separated list
2. **Quality Tier** - High (HD+FPS) > Medium > Low > Dead
3. **Resolution** - Higher resolution preferred within tier
4. **FPS** - Higher framerate preferred within tier
### Example Scenario
**Settings:**
```
M3U Sources: Premium Sports, Backup Provider, Free Streams
```
**Matched Streams for "ESPN":**
- ESPN HD (Premium Sports, 1920x1080, 60fps) → Priority 0, High Quality
- ESPN UHD (Free Streams, 3840x2160, 60fps) → Priority 2, High Quality
- ESPN SD (Premium Sports, 854x480, 30fps) → Priority 0, Low Quality
- ESPN FHD (Backup Provider, 1920x1080, 30fps) → Priority 1, Medium Quality
**Sorted Order:**
1. ESPN HD (Premium Sports) - Priority 0, High Quality ← Best overall
2. ESPN SD (Premium Sports) - Priority 0, Low Quality ← Same provider
3. ESPN FHD (Backup Provider) - Priority 1, Medium Quality
4. ESPN UHD (Free Streams) - Priority 2, High Quality ← Despite being 4K, sorted last
### Configuration
1. Navigate to the Stream-Mapparr plugin settings
2. Find the **"📡 M3U Sources (comma-separated, prioritized)"** field
3. Enter your M3U provider names in priority order, separated by commas:
```
Premium IPTV, Local M3U, Backup Provider
```
4. Save settings and run "Load/Process Channels" or "Sort Alternate Streams"
### Use Cases
- **Primary/Backup Providers**: Prioritize premium providers over backup sources for reliability
- **Regional Preferences**: Prioritize local M3U sources for better geographic performance
- **Quality Control**: Use specific providers known for better encoding/stability
- **Cost Optimization**: Prioritize cheaper sources when quality differences are negligible
### Notes
- Leave the M3U Sources field **empty** to disable prioritization (streams sort by quality only)
- Order matters: the **first** M3U in the list gets **highest** priority
- Prioritization applies to both "Match & Assign Streams" and "Sort Alternate Streams" actions
- Streams from unspecified M3U sources receive lowest priority (999)
# Stream-Mapparr Plugin Changelog (v0.6.0a -> v0.6.0b)
## New Features
* **Smart Analysis & Recommendations:**
* Added "What-if" analysis: Automatically tests matching at lower fuzzy thresholds (down to 65) to identify potential matches missed by current settings.
* Added Token Mismatch detection: Analyzes unmatched streams to suggest specific prefixes or suffixes (e.g., "US:", "HD") to add to the "Ignore Tags" list.
* **Enhanced CSV Export:**
* CSV files now include a detailed header section containing active settings, version info, and specific optimization recommendations based on the Smart Analysis.
* Rows now include data on potential matches found at lower thresholds.
* **Rate Limiting:** Added a "None (Disabled)" option to remove all artificial delays for faster processing on local networks.
* **Notifications:** Implemented WebSocket-based frontend notifications to display progress bars and success/error toasts during long-running operations.
## Improvements
* **Matching Logic:** Improved fuzzy matching algorithm to handle token overlap, better detecting matches where word order differs (e.g., "Channel Name US" vs "US Channel Name").
* **Maintenance:** Added a "Cleanup Orphaned Tasks" action to remove stale Celery Beat schedules left behind by older plugin versions.
* **Scheduling:** Updated schedule saving logic to provide immediate feedback on the next calculated run times in the local timezone.
## Internal
* Added `_get_matches_at_thresholds` and `_analyze_token_mismatch` methods to power the new recommendation engine.
* Refined `_clean_channel_name` to support optional country prefix removal.