Skip to content

Commit

Permalink
Merge pull request #2 from flubshi/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 25, 2019
2 parents 093e4b1 + d4c881f commit 7ad499e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions depends/common/rapidjson/rapidjson.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
3 changes: 2 additions & 1 deletion pvr.waipu/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.waipu"
version="0.1.0"
version="0.5.0"
name="waipu.tv PVR Client"
provider-name="flubshi">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -26,6 +26,7 @@
<screenshot>resources/screenshots/screenshot-02.jpg</screenshot>
</assets>
<news>
- 0.5.0 Update to PVR addon API v6.0.0
- 0.1.0 adjust dst workaround; fix stoi
- 0.0.9 Improve handling of recordings, update user-agent, readme and description
- 0.0.8 Check for JSON parse errors
Expand Down
4 changes: 2 additions & 2 deletions src/WaipuData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ PVR_ERROR WaipuData::GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANN
return PVR_ERROR_NOT_IMPLEMENTED;
}

PVR_ERROR WaipuData::GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &channel, time_t iStart, time_t iEnd)
PVR_ERROR WaipuData::GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, time_t iStart, time_t iEnd)
{
if (!ApiLogin()){
return PVR_ERROR_SERVER_ERROR;
}
for (unsigned int iChannelPtr = 0; iChannelPtr < m_channels.size(); iChannelPtr++)
{
WaipuChannel &myChannel = m_channels.at(iChannelPtr);
if (myChannel.iUniqueId != (int) channel.iUniqueId)
if (myChannel.iUniqueId != iChannelUid)
continue;

char startTime[100];
Expand Down
2 changes: 1 addition & 1 deletion src/WaipuData.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class WaipuData

virtual string GetChannelStreamUrl(int uniqueId, const string& protocol);

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);

int GetRecordingsAmount(bool bDeleted);
PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool bDeleted);
Expand Down
6 changes: 3 additions & 3 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ PVR_ERROR GetDriveSpace(long long *iTotal, long long *iUsed)
return PVR_ERROR_NOT_IMPLEMENTED;
}

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 m_data->GetEPGForChannel(handle, channel, iStart, iEnd);
return m_data->GetEPGForChannel(handle, iChannelUid, iStart, iEnd);

return PVR_ERROR_SERVER_ERROR;
}
Expand Down Expand Up @@ -417,6 +417,7 @@ long long SeekRecordedStream(long long iPosition, int iWhence /* = SEEK_SET */)
long long LengthRecordedStream(void) { return 0; }
void DemuxReset(void) {}
void DemuxFlush(void) {}
void FillBuffer(bool mode) {}
bool OpenLiveStream(const PVR_CHANNEL&) { return false; }
void CloseLiveStream(void) {}
int ReadLiveStream(unsigned char *pBuffer, unsigned int iBufferSize) { return 0; }
Expand All @@ -435,7 +436,6 @@ bool CanPauseStream(void) { return false; }
bool CanSeekStream(void) { return false; }
bool SeekTime(double,bool,double*) { return false; }
void SetSpeed(int) {};
bool IsTimeshifting(void) { return false; }
bool IsRealTimeStream(void) { return true; }
PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording) { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR DeleteAllRecordingsFromTrash() { return PVR_ERROR_NOT_IMPLEMENTED; }
Expand Down

0 comments on commit 7ad499e

Please sign in to comment.