diff --git a/docs/architecture/m3u-playlist-module.md b/docs/architecture/m3u-playlist-module.md index bc55a1ddf..08e2174d3 100644 --- a/docs/architecture/m3u-playlist-module.md +++ b/docs/architecture/m3u-playlist-module.md @@ -9,6 +9,7 @@ The M3U playlist module provides: - EPG (Electronic Program Guide) integration - Favorites management with drag-and-drop reordering - Channel grouping and search +- Per-playlist group visibility management in the groups view - Video playback with multiple player backends ## Module Structure @@ -73,6 +74,10 @@ interface PlaylistState { } ``` +`PlaylistMeta` is the persisted playlist-facing subset of the playlist entity. +For M3U playlists it now also carries `hiddenGroupTitles?: string[]`, which is +used by the groups view to remember which group titles the user has hidden. + ### Actions | Action Group | Actions | Purpose | @@ -181,6 +186,23 @@ channel-list-container/ - empty source: no channels in the playlist after loading completes - empty search: no matches within an already loaded playlist +### Group Visibility Management + +- `GroupsViewComponent` owns the M3U-only "Manage groups" action and dialog in + `libs/ui/components/src/lib/channel-list-container/groups-view/`. +- The dialog operates on the full grouped dataset, while the left rail and + channel pane render only groups whose titles are not listed in + `hiddenGroupTitles`. +- `ChannelListContainerComponent` reads `hiddenGroupTitles` from the active M3U + playlist metadata and passes it into the groups view. Saving dialog changes + dispatches `PlaylistActions.updatePlaylistMeta`. +- `PlaylistsService.updatePlaylistMeta()` persists `hiddenGroupTitles` into the + stored playlist payload, and M3U refresh/update flows preserve the existing + value when refreshed playlist data omits the field. +- The groups route keeps the manage action reachable even when every group is + hidden by separating "playlist has no groups" from "no visible/search-matching + groups" empty states. + ### EnrichedChannel Pattern For performance optimization, channels are pre-enriched with EPG data: