Skip to content

Commit

Permalink
[pvr] added: CPVRRecording::IsBeingRecorded()
Browse files Browse the repository at this point in the history
  • Loading branch information
opdenkamp committed Mar 5, 2015
1 parent 989c853 commit 8d3a0a1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions xbmc/pvr/recordings/PVRRecording.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,13 @@ CPVRChannelPtr CPVRRecording::Channel(void) const
}
return CPVRChannelPtr();
}

bool CPVRRecording::IsBeingRecorded(void) const
{
if (m_iEpgEventId)
{
EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::Get().GetTagById(m_iEpgEventId);
return epgTag ? epgTag->HasRecording() : false;
}
return false;
}
7 changes: 7 additions & 0 deletions xbmc/pvr/recordings/PVRRecording.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,16 @@ namespace PVR

/*!
* @return Get the channel on which this recording is/was running
* @note Only works if the recording has an EPG id provided by the add-on
*/
CPVRChannelPtr Channel(void) const;

/*!
* @return True while the recording is running
* @note Only works if the recording has an EPG id provided by the add-on
*/
bool IsBeingRecorded(void) const;

private:
CDateTime m_recordingTime; /*!< start time of the recording */
bool m_bGotMetaData;
Expand Down

0 comments on commit 8d3a0a1

Please sign in to comment.