Skip to content

Commit

Permalink
Merge pull request #46 from ksooo/pvr-api-5-0-0
Browse files Browse the repository at this point in the history
Implement PVR API 4.2.0 and 5.0.0
  • Loading branch information
ksooo committed Feb 16, 2016
2 parents 9459a48 + 22cfda8 commit bceff5a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pvr.argustv/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.argustv"
version="2.0.1"
version="2.1.0"
name="ARGUS TV client"
provider-name="Fred Hoogduin, Marcel Groothuis">
<requires>
<c-pluff version="0.1"/>
<import addon="xbmc.pvr" version="4.1.0"/>
<import addon="xbmc.pvr" version="5.0.0"/>
</requires>
<extension
point="xbmc.pvrclient"
Expand Down
2 changes: 2 additions & 0 deletions pvr.argustv/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v2.1.0 (14-02-2016)
- Update to PVR addon API v5.0.0
v2.0.1 (23-01-2016)
- Updated language files from Transifex
v2.0.0 (17-01-2016)
Expand Down
14 changes: 5 additions & 9 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "client.h"
#include "kodi/xbmc_pvr_dll.h"
#include "kodi/libKODI_guilib.h"
#include "pvrclient-argustv.h"
#include "utils.h"
#include "uri.h"
Expand Down Expand Up @@ -323,12 +322,12 @@ const char* GetMininumPVRAPIVersion(void)

const char* GetGUIAPIVersion(void)
{
return KODI_GUILIB_API_VERSION;
return ""; // GUI API not used
}

const char* GetMininumGUIAPIVersion(void)
{
return KODI_GUILIB_MIN_API_VERSION;
return ""; // GUI API not used
}

//-- GetAddonCapabilities -----------------------------------------------------
Expand Down Expand Up @@ -592,11 +591,6 @@ long long LengthLiveStream(void)
return g_client->LengthLiveStream();
}

int GetCurrentClientChannel()
{
return g_client->GetCurrentClientChannel();
}

bool SwitchChannel(const PVR_CHANNEL &channelinfo)
{
return g_client->SwitchChannel(channelinfo);
Expand Down Expand Up @@ -681,6 +675,8 @@ bool IsTimeshifting(void) { return false; }
time_t GetPlayingTime() { return 0; }
time_t GetBufferTimeStart() { return 0; }
time_t GetBufferTimeEnd() { return 0; }
bool IsRealTimeStream() { return true; }
PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording) { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR DeleteAllRecordingsFromTrash() { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR DeleteAllRecordingsFromTrash() { return PVR_ERROR_NOT_IMPLEMENTED;}
PVR_ERROR SetEPGTimeFrame(int) { return PVR_ERROR_NOT_IMPLEMENTED; }
} //end extern "C"
9 changes: 4 additions & 5 deletions src/pvrclient-argustv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,10 @@ PVR_ERROR cPVRClientArgusTV::GetRecordings(ADDON_HANDLE handle)
PVR_STRCPY(tag.strTitle, recording.Title());
PVR_STRCPY(tag.strPlotOutline, recording.SubTitle());
PVR_STRCPY(tag.strStreamURL, recording.RecordingFileName());

/* TODO: PVR API 5.0.0: Implement this */
tag.iChannelUid = PVR_CHANNEL_INVALID_UID;

PVR->TransferRecordingEntry(handle, &tag);
iNumRecordings++;
}
Expand Down Expand Up @@ -1433,11 +1437,6 @@ bool cPVRClientArgusTV::SwitchChannel(const PVR_CHANNEL &channelinfo)
}


int cPVRClientArgusTV::GetCurrentClientChannel()
{
return m_iCurrentChannel;
}

PVR_ERROR cPVRClientArgusTV::SignalStatus(PVR_SIGNAL_STATUS &signalStatus)
{
static PVR_SIGNAL_STATUS tag;
Expand Down
1 change: 0 additions & 1 deletion src/pvrclient-argustv.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class cPVRClientArgusTV
long long SeekLiveStream(long long pos, int whence);
long long PositionLiveStream(void);
long long LengthLiveStream(void);
int GetCurrentClientChannel();
bool SwitchChannel(const PVR_CHANNEL &channel);
PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS &signalStatus);
bool CanPauseAndSeek(void);
Expand Down

0 comments on commit bceff5a

Please sign in to comment.