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] Addon API: Add PVR_PROPERTIES.iEpgMaxDays, PVR_RECORDING.channelType #9295

Merged
merged 3 commits into from Mar 8, 2016

Conversation

ksooo
Copy link
Member

@ksooo ksooo commented Mar 7, 2016

This PR introduces a PVR addon API change. It will get merged immediately after #9290 to keep number of api bumps for Krypton small.

  1. Epg max days (number of days the user wants Kodi to hold epg event data) now will be transferred along with PVR_PROPERTIES to Addon_Create function. Thus, the pvr addon knows the correct value immediately when it gets created. Before, the value was transferred some time after the addon got created, making it impossible for the addon to initialize it's backend connection with the correct epg max days value without deferring connecting to the backend until epg max days values got set by Kodi, making a true asynchronous backend connection setup impossible.

  2. Introduce PVR_RECORDING.channelType. This way, addons can flag recordings as TV or radio recordings making it possible to distinguish in kodi between these types, for instance to provide separate listings of tv and radio recordings, implement separate next recording widgets for radio and tv, .... It must be up to the addons/backend to supply this information as it is not always possible to obtain the type of a given channel at runtime, because the channel the recoding has been done may no longer be available at the time the channel type is needed. Kodi core implementation will be done in a followup PR.

Due to this API change, all PVR addons need to be recompiled, no other changes are required, unless async epg data transfer including addon-side filtering of transferred epg data according to epg max days value shall be implemented.

Second commit fixes crash due to a multithreading issue with CGUIEPGGridContainer that occured while testing the API change.

@ksooo ksooo added Type: Fix non-breaking change which fixes an issue Component: PVR API change: PVR labels Mar 7, 2016
@ksooo ksooo added this to the Krypton 17.0-alpha1 milestone Mar 7, 2016
@ksooo
Copy link
Member Author

ksooo commented Mar 7, 2016

@Jalle19 mind taking a look

@@ -237,6 +237,7 @@ extern "C" {
{
const char* strUserPath; /*!< @brief path to the user profile */
const char* strClientPath; /*!< @brief path to this add-on */
int iEpgMaxDays; /*!< @brief if > EPG_TIMEFRAME_UNLIMITED, in async epg mode, deliver only events in the range from 'end time > now' to 'start time < now + iEpgMaxDays. EPG_TIMEFRAME_UNLIMITED, notify all events. */

This comment was marked as spam.

This comment was marked as spam.

@AlwinEsch
Copy link
Member

Need also a increase of XBMC_PVR_API_VERSION

The XBMC_PVR_MIN_API_VERSION is OK and can be left so.

@@ -195,9 +196,6 @@ ADDON_STATUS CPVRClient::Create(int iClientId)
catch (std::exception &e) { LogException(e, __FUNCTION__); }

m_bReadyToUse = bReadyToUse;

SetEPGTimeFrame(CSettings::GetInstance().GetInt(CSettings::SETTING_EPG_DAYSTODISPLAY));

This comment was marked as spam.

This comment was marked as spam.

@ksooo
Copy link
Member Author

ksooo commented Mar 8, 2016

This pr will merged together with #9290 to avoid another api bump within a short timeframe. 9290 does the api bump.

CFileItemPtr GetSelectedChannelItem() const;
PVR::CPVRChannelPtr GetChannel(int iIndex);
PVR::CPVRChannelPtr GetSelectedChannel();

This comment was marked as spam.

This comment was marked as spam.

@ksooo
Copy link
Member Author

ksooo commented Mar 8, 2016

jenkins build this please

@ksooo ksooo changed the title [PVR] Addon API: Add PVR_PROPERTIES.iEpgMaxDays [PVR] Addon API: Add PVR_PROPERTIES.iEpgMaxDays, PVR_RECORDING.channelType Mar 8, 2016
ksooo added a commit that referenced this pull request Mar 8, 2016
[PVR] Addon API: Add PVR_PROPERTIES.iEpgMaxDays, PVR_RECORDING.channelType
@ksooo ksooo merged commit ed2e547 into xbmc:master Mar 8, 2016
@ksooo ksooo deleted the pvr-addon-props branch March 8, 2016 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change: PVR Component: PVR Type: Fix non-breaking change which fixes an issue v17 Krypton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants