xbmc/xbmc — pull request #5526 by xhaggi (2014-10-17 17:52:59+00:00)
Title: [pvr] fix continue playback of last watched channel on startup if group was deleted or channel was moved

As discussed with @FernetMenta this attempts to fix the issue that the wrong channel is continued at startup if you delete the last played group or move the last played channel to another group, in short if you re-organize your channel setup in the backend.

Here is how this works: first it search for the last watched channel in the "all channels" group and if a channel is found it looks for the last played group which contains this channel. so if you move the last played channel to a new group it starts the channel and set the new group as the playing group at startup. if you delete a group where the last played channel is in the next group which contains this channel or btw the "all channels" group will be the playing group at startup.

I also added a DEBUG output if no channel is found to reproduce the issue described in trac ticket http://trac.xbmc.org/ticket/15397.