Skip to content

Fix: Category Detail "None" no longer appends ": All" to the prefix - #32

Open
sbcrumb wants to merge 1 commit into
PiratesIRC:mainfrom
sbcrumb:fix/prefix-only-group-name
Open

sbcrumb wants to merge 1 commit into
PiratesIRC:mainfrom
sbcrumb:fix/prefix-only-group-name

Conversation

@sbcrumb

@sbcrumb sbcrumb commented Sep 27, 2026 •

Copy link
Copy Markdown

Summary

  • Fixes Category Detail "None" creates "<prefix>: All" instead of prefix-only group #30. With Category Detail = "None - single group (prefix only, no categories)", the resulting Dispatcharr channel group was named <prefix>: All instead of just <prefix>.
  • Fixed in _make_group_name, the single helper every caller (group sync, channel sync, cleanup, stream re-sort, etc.) goes through, so they all agree on the new name.
  • Two edge cases from the issue discussion are handled: a bare prefix still falls back to All, and a prefix already ending in a separator (e.g. DTV-) no longer leaves it dangling (DTV, not DTV-All).
  • Existing <prefix>: All groups from before this fix are renamed in place on the next sync (preserving the group's id and its channels) rather than left behind as an orphaned duplicate next to a freshly created <prefix> group. If a <prefix> group already exists too, both are left alone and a warning is logged instead of merging channels silently.

Test plan

  • pytest tests/ — 1097 passed (21 new tests in tests/test_group_prefix_only.py: sentinel handling, all documented _make_group_name edge cases, regression coverage for Normal/Simple/Refined detail modes, and the migration helper's rename / both-exist-warn / dry-run / no-op / separator-terminated-prefix paths)
  • .github/scripts/validate_plugin.py
  • .github/scripts/check_core_parity.py / check_client_parity.py / check_matcher_golden.py (untouched, confirming this change doesn't touch vendored/matching code)
  • scripts/check_version_sync.py
  • ruff check . --select E9,F63,F7,F82
  • python -m py_compile Lineuparr/*.py

Opening as a draft since I'd like your read on the migration behavior (rename-in-place vs. warn-and-leave-both) before marking it ready.

…efix

Category Detail = "None - single group (prefix only, no categories)" built
its group name through the same path as every other category, giving
"<prefix>: All" instead of the prefix alone the setting's description
promises. Fixed in _make_group_name, the one helper all ~10 callers share,
so cleanup, stream re-sort and group lookup all agree on the new name too.

Two edge cases handled per the issue discussion: a prefix with no channels
still needs a name ("All", unchanged), and a prefix already ending in a
separator (e.g. "DTV-") must not leave it dangling ("DTV", not "DTV-All").

Also migrates an existing "<prefix>: All" group (from before this fix) to
the new "<prefix>" name in place, preserving its id and channel
assignments, rather than leaving it as an orphaned duplicate next to a
freshly created "<prefix>" group. If both already exist, both are left
alone and a warning is logged instead of merging channels silently.

Fixes PiratesIRC#30
@sbcrumb
sbcrumb force-pushed the fix/prefix-only-group-name branch from c1c7220 to 239eeef Compare September 27, 2026 18:32
@sbcrumb
sbcrumb marked this pull request as ready for review September 27, 2026 18:38
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.

Category Detail "None" creates "<prefix>: All" instead of prefix-only group

1 participant