Skip to content

Commit

Permalink
Merge pull request xbmc#25645 from ksooo/addons-fix-recording-provide…
Browse files Browse the repository at this point in the history
…ruid-init

[addons] PVR Add-on API: Fix initialization of PVRRecording::iClientProviderUid
  • Loading branch information
ksooo authored Aug 21, 2024
2 parents 178dc39 + b32d79b commit 202207b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class PVRRecording : public DynamicCStructHdl<PVRRecording, PVR_RECORDING>
m_cStructure->iChannelUid = PVR_RECORDING_VALUE_NOT_AVAILABLE;
m_cStructure->channelType = PVR_RECORDING_CHANNEL_TYPE_UNKNOWN;
m_cStructure->sizeInBytes = PVR_RECORDING_VALUE_NOT_AVAILABLE;
m_cStructure->iClientProviderUid = PVR_PROVIDER_INVALID_UID;
}
PVRRecording(const PVRRecording& recording) : DynamicCStructHdl(recording) {}
/*! \endcond */
Expand Down
2 changes: 1 addition & 1 deletion xbmc/addons/kodi-dev-kit/include/kodi/versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \
"addon-instance/PeripheralUtils.h"

#define ADDON_INSTANCE_VERSION_PVR "9.0.0"
#define ADDON_INSTANCE_VERSION_PVR "9.0.1"
#define ADDON_INSTANCE_VERSION_PVR_MIN "9.0.0"
#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr"
#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "c-api/addon-instance/pvr.h" \
Expand Down
5 changes: 5 additions & 0 deletions xbmc/pvr/recordings/PVRRecording.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ CPVRRecording::CPVRRecording(const PVR_RECORDING& recording, unsigned int iClien
m_strProviderName = recording.strProviderName;
m_iClientProviderUniqueId = recording.iClientProviderUid;

// Workaround for C++ PVR Add-on API wrapper not initializing this value correctly until API 9.0.1
//! @todo Remove with next incompatible API bump.
if (m_iClientProviderUniqueId == 0)
m_iClientProviderUniqueId = PVR_PROVIDER_INVALID_UID;

SetGenre(recording.iGenreType, recording.iGenreSubType,
recording.strGenreDescription ? recording.strGenreDescription : "");
CVideoInfoTag::SetPlayCount(recording.iPlayCount);
Expand Down

0 comments on commit 202207b

Please sign in to comment.