Skip to content

fix: refresh logo cache and improve compact matching#6

Open
Serph91P wants to merge 1 commit into
m3ue:masterfrom
Serph91P:fix/repo-aware-cache-bundesliga-logos
Open

fix: refresh logo cache and improve compact matching#6
Serph91P wants to merge 1 commit into
m3ue:masterfrom
Serph91P:fix/repo-aware-cache-bundesliga-logos

Conversation

@Serph91P

@Serph91P Serph91P commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Scope logo match and index cache entries to the configured github_repo, then bump the cache structure version so stale fork-specific hits and misses are rebuilt.
  • Improve compact fallback matching for logo filenames without channel-specific aliases. Exact basename lookup still wins first, then normalized compact matching handles non-semantic filename variant tokens like custom, hd, fhd, uhd, sd, 4k, and 8k.
  • Preserve specificity ordering in fallback matching so quality-bearing channels like UHD do not get stolen by less specific HD or generic candidates.
  • Keep release packaging limited to runtime files.

Verification

  • php -l Plugin.php via the running m3u-editor PHP runtime.
  • Deterministic PHP smoke test against the local Germany logo index with 725 PNG paths:
    • Bundesliga 1 HD -> sky-sport/hd/sky-sport-bundesliga-1-hd-de.png
    • Bundesliga UHD -> sky-sport/hd/sky-sport-bundesliga-uhd-de.png
    • Bundesliga Replay 1 -> bundes-liga-replay-1-de.png
    • Sky Cinema Action HD -> sky-cinema/hd/sky-cinema-action-hd-de.png
    • Sky Cinema Action Custom HD -> custom/hd/sky-cinema-action-custom-hd-de.png
    • Sport1 HD -> hd/sport1-hd-de.png
    • Das Erste HD -> hd/das-erste-hd-de.png
  • bash scripts/package-plugin.sh
  • unzip -l dist/tv-logos.zip confirmed only plugin.json and Plugin.php are packaged.
  • php scripts/validate-plugin.php via the running m3u-editor PHP runtime.
  • grep -rP "[\x{2013}\x{2014}]" --include='*.php' --include='*.json' --include='*.md' --include='*.sh' . returned clean.
  • grep -n "bundesliga" Plugin.php returned clean.
  • git diff --check returned clean.

Make logo match and index cache entries scoped to the configured GitHub repository so switching forks or changing fork contents does not reuse stale matches.

Improve compact filename fallback matching without channel-specific aliases. Exact basename matches still win first, then compact fallback normalizes non-semantic variant tokens like custom and quality suffixes after the exact path fails. Candidate specificity is evaluated before folder preference so UHD and other quality-bearing names do not get stolen by less specific candidates.

Keep release packaging limited to runtime files.
@Serph91P Serph91P force-pushed the fix/repo-aware-cache-bundesliga-logos branch from 4b11f51 to ee53748 Compare June 10, 2026 17:22
@Serph91P Serph91P changed the title fix: refresh logo cache and match Bundesliga aliases fix: refresh logo cache and improve compact matching Jun 10, 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.

1 participant