Skip to content

Commit

Permalink
Merge pull request #123 from ksooo/pvr-api-6-0-0
Browse files Browse the repository at this point in the history
Implement PVR addon API v6.0.0
  • Loading branch information
ksooo authored Apr 24, 2019
2 parents 24b8048 + 3926949 commit a02713f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pvr.stalker/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.stalker"
version="3.4.9"
version="4.0.0"
name="Stalker Client"
provider-name="Jamal Edey">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.stalker/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
4.0.0
- Update to PVR addon API v6.0.0

3.4.6
- Bump zlib to version 1.2.11

Expand Down
4 changes: 2 additions & 2 deletions src/SData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,14 @@ SError SData::Authenticate() {
return SERROR_OK;
}

PVR_ERROR SData::GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t start, time_t end) {
PVR_ERROR SData::GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, time_t start, time_t end) {
XBMC->Log(LOG_DEBUG, "%s", __FUNCTION__);

SC::Channel *chan;
time_t now;
SError ret;

chan = m_channelManager->GetChannel(channel.iUniqueId);
chan = m_channelManager->GetChannel(iChannelUid);
if (chan == nullptr) {
XBMC->Log(LOG_ERROR, "%s: channel not found", __FUNCTION__);
return PVR_ERROR_SERVER_ERROR;
Expand Down
2 changes: 1 addition & 1 deletion src/SData.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SData : Base::Cache {

bool ReloadSettings();

PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t start, time_t anEnd);
PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, time_t start, time_t anEnd);

int GetChannelGroupsAmount();

Expand Down
6 changes: 3 additions & 3 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ const char *GetBackendHostname(void) {
return "";
}

PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t iStart, time_t iEnd) {
PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, time_t iStart, time_t iEnd) {
if (!m_data)
return PVR_ERROR_SERVER_ERROR;

return m_data->GetEPGForChannel(handle, channel, iStart, iEnd);
return m_data->GetEPGForChannel(handle, iChannelUid, iStart, iEnd);
}

int GetChannelGroupsAmount(void) {
Expand Down Expand Up @@ -315,12 +315,12 @@ void DemuxReset(void) { }
void DemuxAbort(void) { }
void DemuxFlush(void) { }
DemuxPacket *DemuxRead(void) { return NULL; }
void FillBuffer(bool mode) {}
bool CanPauseStream(void) { return false; }
bool CanSeekStream(void) { return false; }
void PauseStream(bool bPaused) { }
bool SeekTime(double time, bool backwards, double *startpts) { return false; }
void SetSpeed(int speed) { }
bool IsTimeshifting(void) { return false; }
bool IsRealTimeStream(void) { return true; }
PVR_ERROR SetEPGTimeFrame(int) { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR SetRecordingLifetime(const PVR_RECORDING*) { return PVR_ERROR_NOT_IMPLEMENTED; }
Expand Down

0 comments on commit a02713f

Please sign in to comment.