Skip to content

Commit

Permalink
Merge pull request #54 from flubshi/matrix_fix_recordable
Browse files Browse the repository at this point in the history
Fix: prevent recording of epg tags in the past
  • Loading branch information
flubshi authored Dec 26, 2019
2 parents a8fb50c + e5f53e6 commit 0b40aa2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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="1.3.2"
version="1.3.3"
name="waipu.tv PVR Client"
provider-name="flubshi">
<requires>@ADDON_DEPENDS@
Expand Down Expand Up @@ -30,6 +30,7 @@
<screenshot>resources/screenshots/screenshot-02.jpg</screenshot>
</assets>
<news>
- 1.3.3 Fix: hide recordable option for items in the past
- 1.3.2 Add inputstream.adaptive to dependencies; Fix translation IDs; Show record option only if available
- 1.3.1 Add channel groups: display favorites
- 1.3.0 Implement O2 authentication
Expand Down
8 changes: 8 additions & 0 deletions src/WaipuData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,14 @@ std::string WaipuData::GetLicense(void)

PVR_ERROR WaipuData::IsEPGTagRecordable(const EPG_TAG* tag, bool* bIsRecordable)
{
time_t current_time;
time(&current_time);
if (tag->endTime < current_time)
{
// if tag is in past, no recording is possible
*bIsRecordable = false;
return PVR_ERROR_NO_ERROR;
}

for (const auto& epgEntry : m_epgEntries)
{
Expand Down

0 comments on commit 0b40aa2

Please sign in to comment.