Skip to content

Commit

Permalink
Merge pull request xbmc#3989 from xhaggi/fix-channel-icon
Browse files Browse the repository at this point in the history
[pvr] fix: changed thumbnail not instantly applied in channel list (Ticket xbmc#14820)
  • Loading branch information
Lars Op den Kamp committed Jan 21, 2014
2 parents c0254bc + abc6253 commit 0b5e6b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions xbmc/pvr/channels/PVRChannelGroup.h
Expand Up @@ -398,6 +398,13 @@ namespace PVR
*/
CPVRChannelPtr GetByClient(int iUniqueChannelId, int iClientID) const;

/*!
* @brief Get a channel given it's unique ID.
* @param iUniqueID The unique ID.
* @return The channel or NULL if it wasn't found.
*/
CPVRChannelPtr GetByUniqueID(int iUniqueID) const;

void SetSelectedGroup(bool bSetTo);
bool IsSelectedGroup(void) const;

Expand Down Expand Up @@ -487,13 +494,6 @@ namespace PVR

void ResetChannelNumbers(void);

/*!
* @brief Get a channel given it's unique ID.
* @param iUniqueID The unique ID.
* @return The channel or NULL if it wasn't found.
*/
CPVRChannelPtr GetByUniqueID(int iUniqueID) const;

/*!
* @brief Get a channel given it's channel ID.
* @param iChannelID The channel ID.
Expand Down
7 changes: 5 additions & 2 deletions xbmc/pvr/windows/GUIWindowPVRChannels.cpp
Expand Up @@ -497,8 +497,11 @@ bool CGUIWindowPVRChannels::OnContextButtonSetThumb(CFileItem *item, CONTEXT_BUT
if (strThumb == "thumb://None")
strThumb = "";

channel->SetIconPath(strThumb, true);
channel->Persist();
CPVRChannelGroupPtr group = g_PVRChannelGroups->GetGroupAll(channel->IsRadio());
CPVRChannelPtr channelPtr = group->GetByUniqueID(channel->UniqueID());

channelPtr->SetIconPath(strThumb, true);
channelPtr->Persist();
UpdateData();
}

Expand Down

0 comments on commit 0b5e6b6

Please sign in to comment.