[SCM] kodi-pvr-hts/master: [API 5.1.0] Implement PVR_RECORDING.channelType
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Fri Nov 4 23:23:38 UTC 2016
The following commit has been merged in the master branch:
commit 35dfb609bef49709a2153154894e969bf1f1f0ef
Author: Kai Sommerfeld <kai.sommerfeld at gmx.com>
Date: Tue Mar 8 20:21:40 2016 +0100
[API 5.1.0] Implement PVR_RECORDING.channelType
diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
index 8f35f91..3f9de8d 100644
--- a/src/Tvheadend.cpp
+++ b/src/Tvheadend.cpp
@@ -474,6 +474,22 @@ PVR_ERROR CTvheadend::GetRecordings ( ADDON_HANDLE handle )
/* channel id */
rec.iChannelUid = recording.GetChannel() > 0 ? recording.GetChannel() : PVR_CHANNEL_INVALID_UID;
+ /* channel type */
+ if (rec.iChannelUid == PVR_CHANNEL_INVALID_UID)
+ {
+ rec.channelType = PVR_RECORDING_CHANNEL_TYPE_UNKNOWN;
+ }
+ else
+ {
+ auto cit = m_channels.find(rec.iChannelUid);
+ if (cit == m_channels.cend())
+ rec.channelType = PVR_RECORDING_CHANNEL_TYPE_UNKNOWN;
+ else if (cit->second.IsRadio())
+ rec.channelType = PVR_RECORDING_CHANNEL_TYPE_RADIO;
+ else
+ rec.channelType = PVR_RECORDING_CHANNEL_TYPE_TV;
+ }
+
recs.push_back(rec);
}
}
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list