Skip to content

Add Norwegian channels#30

Merged
PiratesIRC merged 2 commits into
PiratesIRC:mainfrom
sebastas:main
Jun 13, 2026
Merged

Add Norwegian channels#30
PiratesIRC merged 2 commits into
PiratesIRC:mainfrom
sebastas:main

Conversation

@sebastas

Copy link
Copy Markdown
Contributor

Add support for Norwegian channels here as well. Docs should probably also be updated

@PiratesIRC

Copy link
Copy Markdown
Owner

Thanks for this, @sebastas — 94 channels, clean JSON, and it parses + validates fine. One change before merge:

The type values don't match the plugin's taxonomy. This file uses National / International / Regional, but the loader (fuzzy_matcher.py) only recognizes two type families:

  • "broadcast (OTA)" — over-the-air channels, must include a "callsign" (matched by callsign).
  • "premium/cable/national" — everything else (matched by name).

The loader buckets a channel as OTA only if the word broadcast appears in type; otherwise it falls through to the premium/name-matching path. So as written, all 94 NO channels load as premium — it works, but it's off-spec, and any genuinely OTA Norwegian channels (e.g. NRK1, TV 2) miss out on callsign matching.

Requested change: map the current types to the supported values:

Current Use
National / International / Regional (name-matched) "premium/cable/national"
any true OTA broadcaster "broadcast (OTA)" + add a "callsign" field

If Norway's IPTV streams don't carry callsigns, just set everything to "premium/cable/national" and you're done. See the ### Adding Channel Databases section in CLAUDE.md for the reference schema, and the existing NL_channels.json / DE_channels.json for examples.

And yes — please also add NO to the channel-database docs as you noted. 🙏

@PiratesIRC

Copy link
Copy Markdown
Owner

Update after review of the live databases: I'm retracting the type-normalization request. The matcher and validate_databases.py only treat a type containing "broadcast" as special (OTA, needs callsign); every other value (including National/Regional/International) is free-form and name-matched — and the live US_channels.json already uses National/Regional. So Norway's types are fine as-is. The only remaining ask is the docs note you already flagged: please add NO to the channel-database list. Thanks again!

PiratesIRC added a commit that referenced this pull request Jun 13, 2026
…tion

Approved design: port Lineuparr's alias_match mechanism + a reconciled US
alias table + custom_aliases setting into Stream-Mapparr (Option A: alias as
fuzzy_match Stage 0). Backed by a coverage analysis showing 17% no-match lift
on 297 alias-keyed channels against 11.8k real US streams. Includes docs-only
taxonomy reconciliation (only "broadcast" type is special; PR #30 valid as-is).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PiratesIRC added a commit that referenced this pull request Jun 13, 2026
…_ALIASES import

- _ensure_matcher_and_aliases(): idempotently init the matcher + alias map at
  the top of load_process_channels_action, so background-scheduler runs (which
  bypass run()) get alias lift instead of silently falling back to no aliases.
- Rename `from .aliases import COUNTRY_ALIASES` -> `ALIAS_COUNTRY_OVERRIDES` to
  remove the name collision with Plugin.COUNTRY_ALIASES (country-code detection),
  surfaced while reviewing PR #30. No behavior change (was referenced via self.).
- Tests: cold-start + idempotency locks for the new helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PiratesIRC

Copy link
Copy Markdown
Owner

Merged — thank you, @sebastas! 🇳🇴 You added a clean 94-channel NO_channels.json, wired Norway into the country-detection aliases (NO/NOR/NORWAY/NORGE), and updated the README + docs. Validates against the schema and slots right in alongside the other country databases. Appreciate you addressing the review notes so quickly. 🙌

@PiratesIRC PiratesIRC merged commit f5068f4 into PiratesIRC:main Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants