opdenkamp/xbmc — pull request #512 by mikrohard (2012-04-19 13:16:29+00:00)
Title: Don't delete groups added by the user with XBMC

Right now it's impossible to use user defined groups because they are either deleted because they don't exist in the backend (if group syncing is enabled) or the channels are removed from them because they don't exist in the backend (if group syncing is disabled). Either way the result is the same... after you reopen XBMC, the groups are not displayed.

This code extends the pvr database and adds a "is set by user" flag to user defined groups. A group flagged as "set by user" if it's created with the group manager. Flagged groups are not deleted/updated from the client.

This code also contains two other bug fixes:
1.) Don't reset the channel number cache on groups that are not being displayed. If a background group is updated (either by the backend or by the user) while being on the channel list results in a corrupted numbering.
2.) Default return true when persisting channel group members to prevent false returning when persisting (creating) a new (empty) group. This fixes the problem in the group manager where it was needed to close and reopen it to see the newly added group.