Skip to content

Refactor IPTV synchronization logic and settings UI#264

Merged
ProdigyV21 merged 2 commits into
ProdigyV21:mainfrom
Himanth-reddy:fix-iptv-settings
May 27, 2026
Merged

Refactor IPTV synchronization logic and settings UI#264
ProdigyV21 merged 2 commits into
ProdigyV21:mainfrom
Himanth-reddy:fix-iptv-settings

Conversation

@Himanth-reddy
Copy link
Copy Markdown
Collaborator

This pull request introduces significant improvements to how IPTV group management is handled, particularly by introducing composite keys for playlist/group operations and updating the UI to support per-playlist group management. The changes enhance both the internal data structure and the user experience for managing IPTV categories.

Key changes include:

IPTV Group Data Model & Repository Logic

  • Introduced a new PlaylistGroupKey value class to efficiently represent composite keys of playlistId|groupName, reducing string allocations and improving clarity in group operations. (IptvModels.kt)
  • Refactored IPTV group management methods in IptvRepository to use the new composite key, updating functions like toggleHiddenGroup, moveGroupUp, moveGroupDown, and moveGroupToTop to require both playlistId and groupName. Added a new resetGroupOrder method for per-playlist resets. (IptvRepository.kt) [1] [2] [3] [4]
  • Updated group order and hidden group decoding logic to migrate old data to the new composite key format, ensuring backward compatibility. (IptvRepository.kt) [1] [2]

UI/UX Improvements for IPTV Settings

  • Added a new UI flow in SettingsScreen.kt for managing IPTV categories per playlist. This includes a new navigation path ("IPTV_CATEGORIES") and a dedicated IptvCategoriesSettings composable for group management. (SettingsScreen.kt) [1] [2] [3]
  • Updated the IPTV settings UI to include a "Manage Categories" action for each playlist, both as an icon and as a CatalogActionChip, allowing users to directly access group management for a specific playlist. (SettingsScreen.kt) [1] [2] [3]

Cloud Sync Adjustments

  • Removed obsolete iptvHiddenGroups and iptvGroupOrder fields from the cloud sync repository, as group management is now handled per playlist with composite keys. (CloudSyncRepository.kt) [1] [2] [3]

These changes collectively improve the scalability and maintainability of IPTV group management, and provide a more intuitive user experience for managing groups on a per-playlist basis.

@ProdigyV21
Copy link
Copy Markdown
Owner

Please update the IPTV TV/D-pad action map for the new Manage Categories action.

The row now has 6 actions, so iptvActionIndex should allow 0..5.
Enter handling should be:
0 = manage categories
1 = toggle playlist
2 = edit
3 = move up
4 = move down
5 = delete

Also pass onManageCategories into both the "iptv" and "TV" IptvSettings calls, same as the mobile path, so the category screen actually opens.

@Collier14
Copy link
Copy Markdown

Would there also be a toggle to hide groups and channels on this ?
Thank you.

@ProdigyV21 ProdigyV21 merged commit ed8d861 into ProdigyV21:main May 27, 2026
1 check passed
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.

3 participants