Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
pvr: use the client's unique channel id for timer entries instead of …
Browse files Browse the repository at this point in the history
…the channel number on the client (which can change). fixes missing timer entries when using the tvheadend addon. other addons might have to be updated to use the client's unique channel id in timer entries instead of the channel number. don't call UpdateRecordingsCache() while updating timers but afterwards.
  • Loading branch information
opdenkamp committed Mar 6, 2011
1 parent 804de23 commit 2ec58a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions xbmc/pvr/channels/PVRChannelGroup.cpp
Expand Up @@ -228,14 +228,14 @@ void CPVRChannelGroup::SortByChannelNumber(void)

/********** getters **********/

const CPVRChannel *CPVRChannelGroup::GetByClient(int iClientChannelNumber, int iClientID) const
const CPVRChannel *CPVRChannelGroup::GetByClient(int iUniqueChannelId, int iClientID) const
{
CPVRChannel *channel = NULL;

for (unsigned int ptr = 0; ptr < size(); ptr++)
{
PVRChannelGroupMember groupMember = at(ptr);
if (groupMember.channel->ClientChannelNumber() == iClientChannelNumber &&
if (groupMember.channel->UniqueID() == iUniqueChannelId &&
groupMember.channel->ClientID() == iClientID)
{
channel = groupMember.channel;
Expand Down
4 changes: 2 additions & 2 deletions xbmc/pvr/channels/PVRChannelGroup.h
Expand Up @@ -270,11 +270,11 @@ class CPVRChannelGroup : private std::vector<PVRChannelGroupMember>

/*!
* @brief Get a channel given the channel number on the client.
* @param iClientChannelNumber The channel number on the client.
* @param iUniqueChannelId The unique channel id on the client.
* @param iClientID The ID of the client.
* @return The channel or NULL if it wasn't found.
*/
const CPVRChannel *GetByClient(int iClientChannelNumber, int iClientID) const;
const CPVRChannel *GetByClient(int iUniqueChannelId, int iClientID) const;

/*!
* @brief Get a channel given it's channel ID.
Expand Down
3 changes: 0 additions & 3 deletions xbmc/pvr/timers/PVRTimers.cpp
Expand Up @@ -90,9 +90,6 @@ int CPVRTimers::Update()
itr++;
}

//XXX
CPVRManager::Get()->UpdateRecordingsCache();

/* set channel timers */
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
Expand Down

2 comments on commit 2ec58a6

@FernetMenta
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think about adding the channel's uid to the PVR_TIMERSTRUCT and PVRTimerInfoTag?

@opdenkamp
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, sounds good. more will have to be changed there though. those structures aren't fit for other backends, that have different features.

I'm just cleaning a few things up there now and I'm adding some things that are needed to get things working with tvheadend.

Later, we'll have to look at a proper interface for all backends.

Please sign in to comment.