Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PVR] Fixes/Improvements for multiple enable PVR client addons #12959

Merged
merged 7 commits into from
Oct 29, 2017

Conversation

ksooo
Copy link
Member

@ksooo ksooo commented Oct 25, 2017

Fixes:

  • do not delete data from not (yet) ready clients from database. Led to effects like watched state of channels lost, channel sort order lost, etc pp
  • fix visibility of context menu items "add timer" and "record" in context of multiple enabled clients.

Improvements:

  • Introduce priority for pvr clients. makes it possible to sort channels client-by-client (something that was impossible before or achieved via hacks like IPTV simple client's 'start channel numbers at' feature).
    screenshot004
    screenshot005
  • show settings depending on number of enabled clients only if they make sense (i.e. "use backend channel numbers").

Cosmetics:

  • some code cleanup along the way

All changes have been runtime tested carefully on macOS and Linux, latest Kodi master

@Jalle19 for review?

@ksooo ksooo added Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality Component: PVR v18 Leia labels Oct 25, 2017
@ksooo ksooo added this to the L 18.0-alpha1 milestone Oct 25, 2017
@ksooo ksooo requested a review from Jalle19 October 25, 2017 20:42
…d channel group members, ignore enabled clients not yet ready (async pvr manager startup) instead of purging their data from pvr and epg database. Despite of a performance dip, this was the reason for 'last played channels' disappearing after Kodi restart (because this data is stored only locally and got erased due to the bug fixed by this commit).
…ace method and implementation in CPVRClients.
… pvr component (e.g. PVR_CLIENT -> CPVRClientPtr).
…d buttons 'Add timer' and 'Record' only if the client behind the selected item supports timers, not if *any* client supports timers.
… backend channel numbers' only, if exactly one PVR client is enabled (because the feature cannot work reliably with multiple backends).
@ksooo
Copy link
Member Author

ksooo commented Oct 28, 2017

@Jalle19 would be cool if you could find some time to review this, thx.

#empty string with id 36210
#: system/settings/settings.xml
msgctxt "#36210"
msgid "Open the client priorities dialog, which allows modifying the priority for the enabled PVR clients, for instance to order channels client by client, according to your personal preferences. Lower value means higher priority"

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -847,6 +847,18 @@ namespace PVR
void OnPowerSavingDeactivated();

/*!
* @brief Get the priority of this client. Higher value means lower priority.

This comment was marked as spam.

This comment was marked as spam.

if (client.GetID() == PVR_INVALID_CLIENT_ID)
return false;

CLog::Log(LOGDEBUG, "PVR - %s - deleting client '%s' from the database", __FUNCTION__, client.ID().c_str());

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

PVR_CLIENT scanClient;
std::vector<PVR_CLIENT> possibleScanClients = CServiceBroker::GetPVRManager().Clients()->GetClientsSupportingChannelScan();
CPVRClientPtr scanClient;
std::vector<CPVRClientPtr> possibleScanClients = CServiceBroker::GetPVRManager().Clients()->GetClientsSupportingChannelScan();

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -1502,10 +1502,14 @@ namespace PVR

if (!bResetEPGOnly)
{
pvrDatabase->DeleteChannelGroups();
pvrDatabase->DeleteClients();

This comment was marked as spam.

This comment was marked as spam.

@@ -644,6 +676,26 @@ bool CPVRChannelGroup::AddAndUpdateChannels(const CPVRChannelGroup &channels, bo
return bReturn;
}

bool CPVRChannelGroup::IsMissingChannelsFromClient(int iClientId) const
{
for (int iFailedClientID : m_failedClientsForChannels)

This comment was marked as spam.

This comment was marked as spam.


bool CPVRChannelGroup::IsMissingChannelGroupMembersFromClient(int iClientId) const
{
for (auto iFailedClientID : m_failedClientsForChannelGroupMembers)

This comment was marked as spam.

This comment was marked as spam.

…enable and customize ordering channels client by client if multiple clients are enabled.
…r ready to use. All methods accessing the addon must be proteced by this\!
@ksooo
Copy link
Member Author

ksooo commented Oct 28, 2017

@Jalle19 I changed most the stuff you requested. Anything else?

@ksooo ksooo merged commit 82b7222 into xbmc:master Oct 29, 2017
@ksooo ksooo deleted the pvr-multiple-clients branch October 29, 2017 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PVR Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Type: Fix non-breaking change which fixes an issue Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants